home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cspotrun.arc / CSRDOC.DOC < prev    next >
Encoding:
Text File  |  1986-06-20  |  121.5 KB  |  4,260 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.         C Spot Run
  20.  
  21.         A User-Supported C Add-on Library
  22.  
  23.         IBM PC Reference Manual
  24.  
  25.         Version 1.0
  26.  
  27.         May 5, 1986
  28.  
  29.  
  30.         Bob Pritchett
  31.         New Dimension Software
  32.  
  33.         23 Pawtucket Dr.
  34.         Cherry Hill, NJ 08003
  35.  
  36.  
  37.         Copyright 1986 Bob Pritchett
  38.         All Rights Reserved                           C Spot Run - Documentation  
  39.  
  40.  
  41.  
  42.                                 Table of Contents
  43.  
  44.          1. Introduction.............................................  3
  45.             1.1. What is C Spot Run?.................................  3
  46.             1.2. Why C Spot Run?.....................................  3
  47.  
  48.          2. Obtaining and Copying C Spot Run.........................  4
  49.             2.1. User Supported Software.............................  4
  50.             2.2. Ownership of C Spot Run.............................  4
  51.             2.3. Contents of C Spot Run..............................  4
  52.             2.4. License for C Spot Run..............................  4
  53.  
  54.          3. Using the C Spot Run Library.............................  6
  55.             3.1. Using the Library with Your Compiler................  6
  56.             3.2. Modifying the Library...............................  6
  57.                  3.2.1. Problem Areas................................  6
  58.                  3.2.2. Helpful Suggestions..........................  6
  59.             3.3. Using the Utilities and Aids........................  7
  60.  
  61.          4. Format of Routine/Utility Descriptions...................  8
  62.             4.1. How to Use Routine Description Pages................  8
  63.             4.2. How to Use Utility Decription Pages.................  8
  64.  
  65.          5. The Library Routine Descriptions.........................
  66.             5.1. General Descriptions of Related Routines............
  67.             5.2. Individual Routine Descriptions.....................
  68.  
  69.          6. Utility and Aid Descriptions.............................
  70.  
  71.          7. Header File Descriptions.................................
  72.  
  73.          8. Appendix A - Updating the Library........................
  74.  
  75.          9. Appendix B - Contacting Authors..........................
  76.  
  77.         10. Appendix C - Submitting Routines or Utilities............
  78.  
  79.         11. Routine/Utility Submission Form..........................
  80.  
  81.         12. User Response Form.......................................                           C Spot Run - Documentation
  82.  
  83.  
  84.         1. Introduction
  85.  
  86.            1.1.  What is C Spot Run?
  87.  
  88.              C  Spot  Run is a library of C and Assembly routines  for  C 
  89.         programmers.   These  routines supplement the standard  libraries 
  90.         provided  with  compilers,  and  provide  tools  for  specialized 
  91.         applications.
  92.              All  routines in this library are in the public domain,  and 
  93.         the accompanying utilities and programming aids are either public 
  94.         domain or are part of the user supported software world.  
  95.              Our  goal  is  to  provide low  cost  (free!)  routines  and 
  96.         utilities  for  C programmers.   The use of pre-written  routines 
  97.         reduces the amount of tedious code writing. 
  98.  
  99.            1.2.  Why C Spot Run?
  100.  
  101.              What  is  probably the next question to cross your  mind  is 
  102.         simply,  why?   Good question,  and I hope this is a good answer.  
  103.         Because.   Because  there  are so many libraries similar to  this 
  104.         one.  Because they all cost money, and this one doesn't.  Because 
  105.         as of yet there is no central distribution point for much of  the 
  106.         C routines floating around in .C files everywhere.  We think that 
  107.         C  Spot Run is filling a need,  and hope you agree with  us.   In 
  108.         addition,   we  would  appreciate  any  correspondance,   whether 
  109.         positive  or  negative,   and  especially  contributions  to  our 
  110.         collection.                            C Spot Run - Documentation
  111.  
  112.  
  113.         2. Obtaining and Copying C Spot Run
  114.  
  115.            2.1. User Supported Software
  116.  
  117.              User  supported software is software distributed at no  cost 
  118.         with  the  expectation  that those who find useful  will  send  a 
  119.         donation  to  support the development.   In most cases those  who 
  120.         contribute become registered users and receive automatic updates, 
  121.         printed manuals, and/or source code.
  122.              
  123.            2.2. Ownership of C Spot Run
  124.  
  125.              Without  a major essay on copyright laws,  the routines  and 
  126.         utilities  in this package are the property of the  author,  with 
  127.         the exception of those released to the Public Domain. (PD)  It is 
  128.         important  to recognize the difference between Public Domain  and 
  129.         user-supported software.  (User-supported includes  "Share-Ware", 
  130.         "Free-Ware"  and several other names.)  Unlike authors who totaly 
  131.         give their software to the public domain, some authors distribute 
  132.         their  code  with a limited license,  usually  something  to  the 
  133.         effect that you are not to distribute modified versions or charge 
  134.         for the distribution.  
  135.              The  routines  and  utilities in  this  library  are  either 
  136.         totally  public domain or have been released to this library  for 
  137.         distribution as described in Appendix C of this document.
  138.              As to the library itself,  and this documentation,  they are 
  139.         property of Bob Pritchett, and released under the limited license 
  140.         in section 2.4.
  141.  
  142.            2.3. Contents of C Spot Run
  143.  
  144.              The  very  basic  principle  behind this  library  is  user-
  145.         supported software.   In addition to monetary  contributions,  an 
  146.         even  more valuable form is that of routines or utilities.   Most 
  147.         of the routines and utilities in this library were written by two 
  148.         or  three people,  or are modifications of other routines in  the 
  149.         public domain.
  150.              We would like to build a sizable library of tools and  helps 
  151.         for C programmers,  and whether it is a new routine you wrote, or 
  152.         one that is already in the public domain world, your contribution 
  153.         of code and permission to let us use it would be appreciated.
  154.              At  present  this library is a collection  of  routines  and 
  155.         programming  aids only.   As this is the first release we have no 
  156.         idea how it will be received and how successful, or unsuccessful, 
  157.         it  will be.   Being as there are many other  organizations  that 
  158.         maintain large collections of programs in C, such as the C User's 
  159.         Group, this library will focus on routines and utilities. 
  160.  
  161.            2.4. Distribution License for C Spot Run
  162.  
  163.              The  C  Spot Run library of routines and  utilities  may  be 
  164.         freely duplicated and distributed under the following terms.
  165.  
  166.              No  fee may be charged other then  reasonable  expenses  for 
  167.         media and reproduction,  no more then six dollars.  The routines,                            C Spot Run - Documentation
  168.  
  169.  
  170.         utilities,  and  documentation  are  not  to  be  distributed  in 
  171.         modified  form.   All modifications and/or suggestions should  be 
  172.         sent to the author at the address listed at the beginning of this 
  173.         document.   The  routines  and  utilities are not to be  used  in 
  174.         commercial  applications  or business  environments  without  the 
  175.         express  permission  of  the authors.   Credit must be  given  to 
  176.         authors  whose routines are used in any distributed  application, 
  177.         unless other arrangements are made directly with the author.                           C Spot Run - Documentation
  178.  
  179.  
  180.         3. Using the C Spot Run Library
  181.  
  182.            3.1. Using the Library with Your Compiler
  183.  
  184.              All  utilities  included in this library work with  straight 
  185.         ASCII text files,  unless otherwise specified,  and those dealing 
  186.         with the syntax of the C language should work with all flavors of 
  187.         C that conform to the basic guidelines in K&R. 
  188.              The  routines  are distributed  in  several  forms,  usually 
  189.         either  object  code or source code,  C  or  assembly.   Specific 
  190.         information  on  each routine and it's compiler  dependancies  is 
  191.         available  in  the  section entitled Compiler Specifics  in  each 
  192.         routine entry.   As a general rule, object code and libraries are 
  193.         in the Microsoft/Lattice format.  These libraries and object code 
  194.         modules can be linked to your program with LINK.   If the  source 
  195.         code  is available simply check it for compiler differences  (see 
  196.         the next section) and compile it with whatever compiler you use.
  197.  
  198.            3.2. Modifying the Library
  199.  
  200.              Although  many compilers use the same routines,  they  often 
  201.         are  named  differently,  or use a different set  of  parameters.  
  202.         This section should be of assistance in modifying source to  work 
  203.         with  your,  or  someone  else's,  compiler.   If you  have  some 
  204.         information that could be helpful in ocmpiler conversions, please 
  205.         contact us.
  206.  
  207.                 3.2.1. Problem Areas
  208.  
  209.              Some  of the more common differences in  compiler  libraries 
  210.         are the naming conventions used.   For instance,  the routines to 
  211.         perform  a DOS interrupt vary from intdos() to doint(),  and have 
  212.         just as many differences in parameters.   Some common differences 
  213.         are  in string manipulation,  hardware  specific  functions,  and 
  214.         memory  management.   Here is some information that should be  of 
  215.         help:
  216.  
  217.                 3.2.2. Helpful Suggestions
  218.  
  219.              Those  with Microsoft C V3.0 should consult the header  file 
  220.         V2TOV3.H  for  assistance,  and Appendix D of the  User's  Guide, 
  221.         Converting from Previous Versions of the Compiler.
  222.  
  223.              Microsoft  V3.0 uses unions declared in DOS.H as  parameters 
  224.         for it's hardware/DOS functions unlike most other compilers which 
  225.         need  the  register variables etc.  declared by  the  user.   The 
  226.         register  variables are stored in a union of type REGS,  and  are 
  227.         addressed  using the union member x to access registers with x as 
  228.         a second character,  or h to access the registers ending in h  or 
  229.         l.  Example: union REGS in;  n = in.x.ax;  y = in.h.bl;
  230.  
  231.              Microsoft's hardware interrupt is int86(int,&in,&out),  cor-
  232.         responding  to sysint(int,&in,&out) used by many other compilers.  
  233.         Likewise intdos(&in,&out) corresponds to sysint(0x21,&in,&out).                           C Spot Run - Documentation
  234.  
  235.  
  236.              Lattice/Computer  Innovation's  movmem(source,  destination, 
  237.         width) corresponds to Microsoft's  movedata(destination,  source, 
  238.         width).
  239.  
  240.              All of Microsoft's string manipulation functions are in  the 
  241.         format   strxxx()   or   strnxxx().     Example:   strlwr(string) 
  242.         strcat(string1, string2) strncat(string1, string2, number).
  243.  
  244.            3.3. Using the Utilities and Aids
  245.  
  246.              The  use of utilities and programming aids should be clearly 
  247.         described on their description pages.   All include files  should 
  248.         be  included at the beginning of sources that need them,  and  in 
  249.         addition  to the description page most independant utilities will 
  250.         provide  a  short summary of their use when run with  no  command 
  251.         line parameters.                           C Spot Run - Documentation
  252.  
  253.  
  254.         4. Format of Routine/Utility Descriptions
  255.  
  256.            4.1. How to Use the Routine Description Pages
  257.  
  258.              The  routine  description pages are set up in such a  manner 
  259.         that  updates  to  the library will not  require  a  totally  new 
  260.         manual.  
  261.              Each  routine has it's own full page regardless of how small 
  262.         or large it is.   The page is set up in a special order, with the 
  263.         name of the routine on the upper right of the page at the top for 
  264.         quick  indexing,  followed  by a short summary of  the  necessary 
  265.         arguments  and their data types.   Next is a line containing  the 
  266.         creation  and last update dates,  and then the author's name  and 
  267.         whether  the source is in C or Assembly.   Following these  is  a 
  268.         list of the files in which the code is contained, a list of other 
  269.         required  functions that may not be in every library,  and then a 
  270.         paragraph description of the function.   This is followed with  a 
  271.         paragraph  explaining  any  ties to one  specific  compiler,  the 
  272.         return value,  a list of related functions in the library,  and a 
  273.         final example of how it might be used in a portion of code.
  274.              It  is  recommended that you keep the complete manual  in  a 
  275.         three  ring binder,  and as you receive updates simply print  out 
  276.         the enclosed page,  and insert it in alphabetical order among the 
  277.         function  description pages.   (This manual may seem like a waste 
  278.         of paper, but this way it saves a lot in the long run.)
  279.  
  280.            4.2. How to Use the Utility Description Pages
  281.  
  282.              The  utility  description pages are similar to  the  routine 
  283.         descriptions   described   above  except  for   the   layout   of 
  284.         information.  On the utility description pages the first item is, 
  285.         as  with the routine descriptions,  the utility name on the upper 
  286.         right  hand corner.   Next is a summary of the utility  including 
  287.         the creation and last update dates, the author's name, the source 
  288.         language,  and then a copy of the documentation, usually an exact 
  289.         duplicate of whatever documentation the author has sent.
  290.              As  mentioned,  the  method for updating  these  description 
  291.         pages is the same as above in section 4.1.
  292.  
  293.  
  294.                           Directory Management Routines
  295.  
  296.              With the two basic file search routines ffirst() and fnext() 
  297.         any  number  of directories may be generated,  and when  combined 
  298.         with the windowing routines any application can have a convenient 
  299.         system for directory viewing and file selection.
  300.              The possibilities are endless, thus only a limited number of 
  301.         directory viewing routines have been provided,  but we trust that 
  302.         they will help you design and implement whatever file  management 
  303.         you require.  The following are some hints and suggestions:
  304.  
  305.              Finding  and  storing all the file names  before  displaying 
  306.         them has the benefit of allowing scrolling to take place forwards 
  307.         and back, but the disadvantage of a slight delay while reading in 
  308.         the information.  If scrolling is needed, try saving the names as 
  309.         they  are read and displayed,  and keep pointers allowing you  to 
  310.         scroll back, but not forward until the new file names are read.
  311.  
  312.              If  it  is neccessary to divide the file name and  extension 
  313.         two obvious alternatives are presented.   Either write a  routine 
  314.         to go through the string containing the name, looking for the dot 
  315.         separater,  and  split  the  string into two parts,  or  use  the 
  316.         sscanf() function to read the two fields into separate strings.
  317.  
  318.              Whatever you do with the provided directory  routines,  we'd 
  319.         appreciate  a copy of your routine for curiosities sake,  and  if 
  320.         possible, inclusion in a future version of the library. 
  321.  
  322.  
  323.                            Printer Operation Routines
  324.  
  325.              The printer output routines included in this verson, 1.0, of 
  326.         the  library are intended to provide only the basics for  printer 
  327.         control.   The  routines  provide  for single  character  output, 
  328.         lputchar(), string output, lprint(), and formatted string output, 
  329.         lprintf().  
  330.  
  331.              These  routines all call DOS function number 5  which  means 
  332.         that with the DOS MODE command etc.  the output can be redirected 
  333.         or reformatted.
  334.  
  335.              Many  libraries include an extensive set of routines to  set 
  336.         different attributes,  fonts,  and styles on printers.   However, 
  337.         since  these routines are usually dependant on one printer  make, 
  338.         and  generaly do little more then output two or three  characters 
  339.         it  was  thought  best  to provide only  the  generic  lputchar() 
  340.         function.  If you would like to provide a set of printer specific 
  341.         or  independant  routines  to  perform  these  functions,  please 
  342.         contact us.
  343.  
  344.  
  345.                              Window Function Library
  346.  
  347.              The  C  Spot  Run window function library is  a  library  of 
  348.         routines that perform background/foreground windowing.  What this 
  349.         means  is  that any window that is overlapped by another  window, 
  350.         when  addressed  for output,  will be moved to the front  of  the 
  351.         'stack' and become the active window.  
  352.  
  353.              The  window library also contains a large number of  support 
  354.         routines  to  make movement of and output to windows as  easy  as 
  355.         possible.   There  are routines that make  pop-up  menus,  center 
  356.         text,  draw  boxes,  and  do much more.   Full color  support  is 
  357.         available,  and  for speed all of the cursor and output functions 
  358.         are in assembly.
  359.  
  360.              All  windowing functions are in the  file  COUTPUT.OBJ,  and 
  361.         source is not distributed.  
  362.  
  363.              For  ease  of calling,  in general you will  find  that  all 
  364.         window  functions  are  preceeded by a w in  the  function  name, 
  365.         (wopen(), wclose(), etc.) and in most cases the first argument is 
  366.         the window pointer.
  367.  
  368.              For   more  information,   consult  the  detailed   function 
  369.         descriptions.
  370.  
  371.              I would like to thank Philip A. Mongelluzo whose Windows For 
  372.         C  package was of invaluable use to me in the development of this 
  373.         package, not to mention the time he spent answering my questions.
  374.  
  375.  
  376.                                                               border
  377.         Summary:
  378.  
  379.         int border(color);
  380.         int color;               /* Color of Border */
  381.  
  382.         Created: 12/28/85        Last Updated: 12/28/85
  383.  
  384.         Author: Bob Pritchett         Source (C/A): A
  385.  
  386.         Located in: BORDER.OBJ
  387.  
  388.         Requires: Nothing.
  389.  
  390.         Description:
  391.  
  392.         This function draws sets the screen border to the specified color 
  393.         using function 11 of the BIOS video interrupt.
  394.  
  395.         Works in text modes only.
  396.  
  397.         Compiler Specifics:
  398.  
  399.         Has Microsoft's assembly header, otherwise none.
  400.  
  401.         Return Value:
  402.  
  403.         Nothing.
  404.  
  405.         See Also:
  406.  
  407.  
  408.  
  409.         Example:
  410.  
  411.         border(4);          /* Red Border */
  412.  
  413.  
  414.                                                                  box
  415.         Summary:
  416.  
  417.         int box(x,y,x2,y2,type);
  418.         int x;                   /* Upper Left Row */
  419.         int y;                   /* Upper Left Col */
  420.         int x2;                  /* Lower Right Row */
  421.         int y2;                  /* Lower Right Col */
  422.         int type;                /* Style of Border */
  423.  
  424.         Created: 08/  /85        Last Updated: 02/24/86
  425.  
  426.         Author: Bob Pritchett         Source (C/A): C
  427.  
  428.         Located in: BOX.C BOX.OBJ
  429.  
  430.         Requires: gotoxy() putch()
  431.  
  432.         Description:
  433.  
  434.         The  box  function draws a graphic box using the upper  left  and 
  435.         lower  right  corner  coordinates.   The border style  can  be  a 
  436.         combination  of the double and single line characters of the  IBM 
  437.         character set,  or any other printable character used all the way 
  438.         around.   The  border is chosen with type.   If type is equal  to 
  439.         one,  an all single line border is drawn.  If it is two, a double 
  440.         horizontal line and single vertical line is used,  if it is three 
  441.         it  is  an all double border,  if it is four a single  horizontal 
  442.         line and double vertical line are used.   Any other value in type 
  443.         will cause the border to consist entirely of this character.
  444.  
  445.         Compiler Specifics:
  446.  
  447.         BOX.OBJ  was  compiled using MSC 3.0,  but there are no  compiler 
  448.         specifics  involved  other then putch(),  the  put  character  to 
  449.         console function.
  450.  
  451.         Return Value:
  452.  
  453.         Returns  a  one  if successful,  or a  negative  one  if  invalid 
  454.         coordinates are passed.
  455.  
  456.         See Also:
  457.  
  458.         cbox()
  459.  
  460.         Example:
  461.  
  462.         box(10,10,20,30,"*");    /* A box with a border of *'s */
  463.  
  464.  
  465.                                                                 cbox
  466.         Summary:
  467.  
  468.         int cbox(x,y,x2,y2,type);
  469.         int x;                   /* Upper Left Row */
  470.         int y;                   /* Upper Left Col */
  471.         int x2;                  /* Lower Right Row */
  472.         int y2;                  /* Lower Right Col */
  473.         int type;                /* Style of Border */
  474.  
  475.         Created: 03/03/86        Last Updated: 03/03/86
  476.  
  477.         Author: Bob Pritchett         Source (C/A): C
  478.  
  479.         Located in: COUTPUT.OBJ
  480.  
  481.         Requires: putchci() gotoxy()
  482.  
  483.         Description:
  484.  
  485.         This  function  is functionaly the same as box() except that  the 
  486.         box  is drawn in the current color.   It is primarily used as  an 
  487.         internal routine in COUTPUT.OBJ.  For independant use, use color() 
  488.         or wcolor() to set the color. 
  489.  
  490.         Compiler Specifics:
  491.  
  492.         None.
  493.  
  494.         Return Value:
  495.  
  496.         Returns  a  one  if  successful,   a  negative  one  if   invalid 
  497.         coordinates are passed.
  498.  
  499.         See Also:
  500.  
  501.         color() wcolor() box()
  502.  
  503.         Example:
  504.  
  505.         #include <color.h>       /* Just for the colors... */
  506.  
  507.         color(RED_F,WHT_B);      /* Red on White */
  508.  
  509.         cbox(5,5,20,60,1);       /* A box with a single line border */
  510.  
  511.  
  512.                                                              ccenter
  513.         Summary:
  514.  
  515.         int ccenter(row,string,color);
  516.         int row;                 /* Row to Center String on */
  517.         char *string;            /* String to Center on Screen */
  518.         int color;               /* Color to Print String in */
  519.  
  520.         Created: 12/28/85        Last Updated: 12/28/85
  521.  
  522.         Author: Bob Pritchett         Source (C/A): C
  523.  
  524.         Located in: CCENTER.C CENTER.OBJ
  525.  
  526.         Requires: gotoxy() ccputs()
  527.  
  528.         Description:
  529.  
  530.         This  routine  is functionaly the same as center() only that  the 
  531.         line is displayed in the color specified.
  532.  
  533.         Compiler  Specifics:
  534.  
  535.         CCENTER.OBJ  was  compiled with MSC 3.0,  but there are no  other 
  536.         compiler specifics involved.
  537.  
  538.         Return Value:
  539.  
  540.         Nothing is returned and there are no validity checks.   Giving  a 
  541.         string longer then 80 characters, or a line number less then zero 
  542.         or  greater  then 24 will produce an unknown  result  on  screen, 
  543.         while it should return cleanly.
  544.  
  545.         See Also:
  546.  
  547.         center() putat() cputat()
  548.  
  549.         Example:
  550.  
  551.         #include <color.h>
  552.  
  553.         char *string;
  554.         scanf("%s",string);
  555.  
  556.         ccenter(0,"This line is centered in color.",RED_F);
  557.         ccenter(2,"This one is in magenta on black, as opposed to red.",MAG_F);
  558.         ccenter(3,"And yet another line, this time in green.",GRN_F);
  559.  
  560.         ccenter(5,string,WHT_F+BLU_B);
  561.  
  562.  
  563.                                                                 ccls
  564.         Summary:
  565.  
  566.         #include <color.h>       /* For color definitions only... */
  567.  
  568.         int ccls(color);
  569.         int color;               /* Color of Screen */
  570.  
  571.         Created: 12/28/85        Last Updated: 12/28/85
  572.  
  573.         Author: Bob Pritchett         Source (C/A): A
  574.  
  575.         Located in: CCLS.OBJ
  576.  
  577.         Requires: Nothing.
  578.  
  579.         Description:
  580.  
  581.         This  function  clears the screen and sets all the attributes  to 
  582.         the given color.  The cursor is sent to the home position.
  583.  
  584.         Compiler Specifics:
  585.  
  586.         Has Microsoft's assembly header, otherwise none.
  587.  
  588.         Return Value:
  589.  
  590.         Nothing.
  591.  
  592.         See Also:
  593.  
  594.         cls()
  595.  
  596.         Example:
  597.  
  598.         #include <color.h>
  599.  
  600.         ccls(RED_F+BLU_B);       /* Attributes are red on blue. */
  601.  
  602.  
  603.                                                               ccputs
  604.         Summary:
  605.  
  606.         #include <color.h>       /* Color definitions only */
  607.  
  608.         int ccputs(string,color);
  609.         int string;              /* String to Put */
  610.         int color;               /* Color of String */
  611.  
  612.         Created: 12/29/85        Last Updated: 02/24/86
  613.  
  614.         Author: Bob Pritchett         Source (C/A): C
  615.  
  616.         Located in: CCPUTS.OBJ
  617.  
  618.         Requires: putchci()
  619.  
  620.         Description:
  621.  
  622.         This  function  puts the given string out to the  current  cursor 
  623.         position  in  the specified color,  using putchci()  to  do  BIOS 
  624.         output.
  625.  
  626.         Compiler Specifics:
  627.  
  628.         None.
  629.  
  630.         Return Value:
  631.  
  632.         Nothing.
  633.  
  634.         See Also:
  635.  
  636.         putchci()
  637.  
  638.         Example:
  639.  
  640.         #include <color.h>
  641.  
  642.         ccputs("This string in red.\n",RED_F);
  643.  
  644.  
  645.                                                               center
  646.         Summary:
  647.  
  648.         int center(row,string);
  649.         int row;                 /* Row to Center String on */
  650.         char *string;            /* String to Center on Screen */
  651.  
  652.         Created: 09/  /85        Last Updated: 02/24/86
  653.  
  654.         Author: Bob Pritchett         Source (C/A): C
  655.  
  656.         Located in: CENTER.C CENTER.OBJ
  657.  
  658.         Requires: gotoxy() prints()
  659.  
  660.         Description:
  661.  
  662.         This  routine will simply center string on line row.   An  eighty 
  663.         column  display is assumed,  and the cursor is left at the end of 
  664.         the string.
  665.  
  666.         Compiler  Specifics:
  667.  
  668.         CENTER.OBJ  was  compiled with MSC 3.0,  but there are  no  other 
  669.         compiler specifics involved.
  670.  
  671.         Return Value:
  672.  
  673.         Nothing is returned and there are no validity checks.   Giving  a 
  674.         string longer then 80 characters, or a line number less then zero 
  675.         or  greater  then 24 will produce an unknown  result  on  screen, 
  676.         while it should return cleanly.
  677.  
  678.         See Also:
  679.  
  680.         centerf() ccenter() putat() cputat()
  681.  
  682.         Example:
  683.  
  684.         #include <stdio.h>
  685.  
  686.         char *string;
  687.         scanf("%s",string);
  688.  
  689.         center(0,"This line is centered.  Centering has a slight");
  690.         center(1,"disadvantage with constant text in that the computation is");
  691.         center(2,"done at run-time, as opposed to using putat() with a");
  692.         center(3,"precalculated center.");
  693.  
  694.         center(5,string);
  695.  
  696.  
  697.                                                              centerf
  698.         Summary:
  699.  
  700.         int centerf(row,string[,arguments...]);
  701.         int row;                 /* Row to Center String on */
  702.         char *string;            /* String to Center on Screen */
  703.  
  704.         Created: 04/13/86        Last Updated: 04/13/86
  705.  
  706.         Author: Bob Pritchett         Source (C/A): C
  707.  
  708.         Located in: CENTERF.OBJ
  709.  
  710.         Requires: gotoxy() prints()
  711.  
  712.         Description:
  713.  
  714.         This  routine  performs the exact same function as center()  with 
  715.         the  exception  that the string may contain  formatting  controls 
  716.         which  are  proccessed according to the same  rules  as  printf() 
  717.         before the string is centered.  Up to 15 formatting arguments may 
  718.         be used per string.
  719.  
  720.         Compiler  Specifics:
  721.  
  722.         None.
  723.  
  724.         Return Value:
  725.  
  726.         Nothing returned,  nor are coordinates checked, but be careful to 
  727.         make  sure  the formatted string will be less then 80  characters 
  728.         long.
  729.  
  730.         See Also:
  731.  
  732.         center() ccenter() putat() cputat()
  733.  
  734.         Example:
  735.  
  736.         #include <stdio.h>
  737.  
  738.         char *string;
  739.         printf("What is your name? ");
  740.         scanf("%s",string);
  741.  
  742.         centerf(4,"The answer is: %04d",243);
  743.         centerf(7,"Hello, %s, nice to meet you.",string);
  744.  
  745.  
  746.                                                               chline
  747.         Summary:
  748.  
  749.         int chline(x,y,y2,type);
  750.         int x;                   /* Upper Left Row */
  751.         int y;                   /* Upper Left Col */
  752.         int y2;                  /* Lower Right Col */
  753.         int type;                /* Style of Border */
  754.  
  755.         Created: 03/03/86        Last Updated: 03/03/86
  756.  
  757.         Author: Bob Pritchett         Source (C/A): C
  758.  
  759.         Located in: COUTPUT.OBJ
  760.  
  761.         Requires: putchci() gotoxy()
  762.  
  763.         Description:
  764.  
  765.         This  function  will  draw  a  line at  x,y  to  x,y2  using  the 
  766.         character(s) specified in type.   Type may be any one of the five 
  767.         types  accepted by box().   Usually this function is used to draw 
  768.         lines  inside boxes,  as it will use the proper side  characters, 
  769.         but by using an ASCII character in type an ordinary line of  that 
  770.         character is drawn.   The line is drawn in the current color,  as 
  771.         specified by color().
  772.  
  773.         Compiler Specifics:
  774.  
  775.         None.
  776.  
  777.         Return Value:
  778.  
  779.         Returns  a  one  if  successful,   a  negative  one  if   invalid 
  780.         coordinates are passed.
  781.  
  782.         See Also:
  783.  
  784.         cvline() whline()
  785.  
  786.         Example:
  787.  
  788.         #include <color.h>       /* Just for the colors... */
  789.  
  790.         color(RED_F,WHT_B);      /* Red on White */
  791.  
  792.         cbox(5,5,20,60,1);       /* A box with a single line border */
  793.  
  794.         chline(5,7,60,1);        /* Draws a line across the box */
  795.  
  796.  
  797.                                                                  cls
  798.         Summary:
  799.  
  800.         int cls();
  801.  
  802.         Created: 12/28/85        Last Updated: 12/28/85
  803.  
  804.         Author: Bob Pritchett         Source (C/A): A
  805.  
  806.         Located in: CLS.OBJ
  807.  
  808.         Requires: Nothing.
  809.  
  810.         Description:
  811.  
  812.         This  function clears the screen and sends the cursor to the home 
  813.         position using the video BIOS interrupt.
  814.  
  815.         Compiler Specifics:
  816.  
  817.         Microsoft's assembly header information.
  818.  
  819.         Return Value:
  820.  
  821.         Nothing.
  822.  
  823.         See Also:
  824.  
  825.         ccls() wcls()
  826.  
  827.         Example:
  828.  
  829.         cls();
  830.  
  831.  
  832.                                                                color
  833.         Summary:
  834.  
  835.         #include <color.h>       /* For Color Definitions Only */
  836.  
  837.         int color(fore,back)
  838.         int fore;                /* Foreground Color */
  839.         int back;                /* Background Color */
  840.  
  841.         Created: 03/03/86        Last Updated: 03/03/86
  842.  
  843.         Author: Bob Pritchett         Source (C/A): C
  844.  
  845.         Located in: COUTPUT.OBJ
  846.  
  847.         Requires: Nothing.
  848.  
  849.         Description:
  850.  
  851.         This  routine  sets  the  colors  to be  used  in  all  following 
  852.         operations  involving  color  in  the  windows  package,   unless 
  853.         otherwise specified.   The argumetns must be in two  parts,  fore 
  854.         and  back  colors,  with bold,  blink,  etc added to either  one, 
  855.         unlike other routines in which the colors are just added.
  856.  
  857.         Compiler  Specifics:
  858.  
  859.         None.
  860.  
  861.         Return Value:
  862.  
  863.         The color is returned.
  864.  
  865.         See Also:
  866.  
  867.         wcolor()
  868.  
  869.         Example:
  870.  
  871.         #include <color.h>
  872.  
  873.         color(RED_F+BOLD,BLU_B);      /* Bold Red on Blue. */
  874.  
  875.  
  876.                                                         current_page
  877.         Summary:
  878.  
  879.         int current_page();
  880.  
  881.         Created: 02/22/86        Last Updated: 02/24/86
  882.  
  883.         Author: Bob Pritchett         Source (C/A): C
  884.  
  885.         Located in: CURSOR.OBJ
  886.  
  887.         Requires: int86()
  888.  
  889.         Description:
  890.  
  891.         This function returns the current active video page.
  892.  
  893.         Compiler Specifics:
  894.  
  895.         Compiled  with  MSC  3.0.   Only  specific  is  use  of  register 
  896.         structures  of  MSC  and int86().   Usually needs a  change  like 
  897.         sysint() instead of int86().  Check section three of this manual.
  898.  
  899.         Return Value:
  900.  
  901.         Number of current video page is returned,  0-3 or 0-7,  depending 
  902.         on monitor.
  903.  
  904.         See Also:
  905.  
  906.         set_page()
  907.  
  908.         Example:
  909.  
  910.         #include <stdio.h>
  911.  
  912.         printf("The current video display page is: %d\n",current_page());
  913.  
  914.  
  915.                                                           cursor_off
  916.         Summary:
  917.  
  918.         int cursor_off();
  919.  
  920.         Created: 02/22/86        Last Updated: 02/24/86
  921.  
  922.         Author: Bob Pritchett         Source (C/A): C
  923.  
  924.         Located in: CURSOR.OBJ
  925.  
  926.         Requires: int86()
  927.  
  928.         Description:
  929.  
  930.         This  function will turn the cursor off using the technique  used 
  931.         by graphics modes in order to make it 'invisible.'
  932.  
  933.         Compiler Specifics:
  934.  
  935.         Compiled  with  MSC  3.0.   Only  specific  is  use  of  register 
  936.         structures  of  MSC  and int86().   Usually needs a  change  like 
  937.         sysint() instead of int86().  Check section three of this manual.
  938.  
  939.         Return Value:
  940.  
  941.         Nothing.
  942.  
  943.         See Also:
  944.  
  945.         cursor_on()
  946.  
  947.         Example:
  948.  
  949.         cursor_off();
  950.  
  951.  
  952.                                                            cursor_on
  953.         Summary:
  954.  
  955.         int cursor_on();
  956.  
  957.         Created: 02/22/86        Last Updated: 05/03/86
  958.  
  959.         Author: Bob Pritchett         Source (C/A): C
  960.  
  961.         Located in: CURSOR.OBJ
  962.  
  963.         Requires: int86()
  964.  
  965.         Description:
  966.  
  967.         Doing  the  opposite of the cursor_off() function  this  function 
  968.         restores  the cursor and returns the shape (scan lines) to  their 
  969.         default state.
  970.  
  971.         Compiler Specifics:
  972.  
  973.         Compiled  with  MSC  3.0.   Only  specific  is  use  of  register 
  974.         structures  of  MSC  and int86().   Usually needs a  change  like 
  975.         sysint() instead of int86().  Check section three of this manual.
  976.  
  977.         Return Value:
  978.  
  979.         Nothing.
  980.  
  981.         See Also:
  982.  
  983.         cursor_off()
  984.  
  985.         Example:
  986.  
  987.         cursor_off();
  988.  
  989.         cursor_on();
  990.  
  991.  
  992.                                                          cursor_read
  993.         Summary:
  994.  
  995.         int cursor_read(row,col)
  996.         int *row;                /* Location to Store Row */
  997.         int *col;                /* Location to Store Col */
  998.  
  999.         Created: 02/22/86        Last Updated: 02/22/86
  1000.  
  1001.         Author: Bob Pritchett         Source (C/A): C
  1002.  
  1003.         Located in: CURSOR.OBJ
  1004.  
  1005.         Requires: int86()
  1006.  
  1007.         Description:
  1008.  
  1009.         This  funciton places the current cursor positions into  row  and 
  1010.         col, using the video BIOS interrupt.
  1011.  
  1012.         Compiler Specifics:
  1013.  
  1014.         Compiled  with  MSC  3.0.   Only  specific  is  use  of  register 
  1015.         structures  of  MSC  and int86().   Usually needs a  change  like 
  1016.         sysint() instead of int86().  Check section three of this manual.
  1017.  
  1018.         Return Value:
  1019.  
  1020.         Nothing.
  1021.  
  1022.         See Also:
  1023.  
  1024.         gotoxy()
  1025.  
  1026.         Example:
  1027.  
  1028.         int x;
  1029.         int y;
  1030.         cursor_read(&x,&y);
  1031.         gotoxy(x+2,y-3);         /* Move diagonally down and left. */
  1032.  
  1033.  
  1034.                                                          cursor_size
  1035.         Summary:
  1036.  
  1037.         int cursor_size(start,end);
  1038.         int start;               /* Starting Scan Line */
  1039.         int end;                 /* Ending Scan Line */
  1040.  
  1041.         Created: 02/22/86        Last Updated: 02/24/86
  1042.  
  1043.         Author: Bob Pritchett         Source (C/A): C
  1044.  
  1045.         Located in: CURSOR.OBJ
  1046.  
  1047.         Requires: int86()
  1048.  
  1049.         Description:
  1050.  
  1051.         This  funciton  sets the cursor scan lines to start  and  finish.  
  1052.         Note that specifying a larger start then finish line causes it to 
  1053.         wrap around and form a two part cursor.
  1054.  
  1055.         Compiler Specifics:
  1056.  
  1057.         Compiled  with  MSC  3.0.   Only  specific  is  use  of  register 
  1058.         structures  of  MSC  and int86().   Usually needs a  change  like 
  1059.         sysint() instead of int86().  Check section three of this manual.
  1060.  
  1061.         Return Value:
  1062.  
  1063.         None.
  1064.  
  1065.         See Also:
  1066.  
  1067.         cursor_on() cursor_off()
  1068.  
  1069.         Example:
  1070.  
  1071.         cursor_size(6,7);        /* Sets cursor to two line underline */
  1072.                                  /* in color mode. */
  1073.  
  1074.  
  1075.                                                               cvline
  1076.         Summary:
  1077.  
  1078.         int cvline(y,x,x2,type);
  1079.         int y;                   /* Upper Left Col */
  1080.         int x;                   /* Upper Left Row */
  1081.         int x2;                  /* Lower Right Row */
  1082.         int type;                /* Style of Border */
  1083.  
  1084.         Created: 03/03/86        Last Updated: 03/03/86
  1085.  
  1086.         Author: Bob Pritchett         Source (C/A): C
  1087.  
  1088.         Located in: COUTPUT.OBJ
  1089.  
  1090.         Requires: putchci() gotoxy()
  1091.  
  1092.         Description:
  1093.  
  1094.         This  function  will  draw  a  line at  x,y  to  x2,y  using  the 
  1095.         character(s) specified in type.   Type may be any one of the five 
  1096.         types  accepted by box().   Usually this function is used to draw 
  1097.         lines  inside  boxes,  as it will use the proper top  and  bottom 
  1098.         characters,  but by using an ASCII character in type an  ordinary 
  1099.         line  of  that  character is drawn.   The line is  drawn  in  the 
  1100.         current color, as specified by color().
  1101.  
  1102.         Compiler Specifics:
  1103.  
  1104.         None.
  1105.  
  1106.         Return Value:
  1107.  
  1108.         Returns  a  one  if  successful,   a  negative  one  if   invalid 
  1109.         coordinates are passed.
  1110.  
  1111.         See Also:
  1112.  
  1113.         chline() wvline()
  1114.  
  1115.         Example:
  1116.  
  1117.         #include <color.h>       /* Just for the colors... */
  1118.  
  1119.         color(RED_F,WHT_B);      /* Red on White */
  1120.  
  1121.         cbox(5,5,20,60,1);       /* A box with a single line border */
  1122.  
  1123.         cvline(7,5,20,1);        /* Draws a line down the box */
  1124.  
  1125.  
  1126.                                                               dirwin
  1127.         Summary:
  1128.  
  1129.         int dirwin(path,name);
  1130.         char *path;              /* Path, With Drive */
  1131.         char *name;              /* Template for File Name */
  1132.  
  1133.         Created: 04/20/86        Last Updated: 04/22/86
  1134.  
  1135.         Author: Bob Pritchett         Source (C/A): C
  1136.  
  1137.         Located in: DIRWIN.OBJ DIRWIN.C
  1138.  
  1139.         Requires: ffirst() fnext()
  1140.  
  1141.         Description:
  1142.  
  1143.         This  routine  opens a window in the current colors in which  the 
  1144.         specified  directory  is displayed in four columns of  nine  file 
  1145.         names.   When  a  directory exceeds thirty-six file names  a  key 
  1146.         press clears the window and displays the next thirty-six,  and so 
  1147.         on until the last screen is displayed,  after which the window is 
  1148.         closed.
  1149.  
  1150.         The  pathname  should include the drive letter  and  subdirectory 
  1151.         path.   If  the  root is being used at least the \ should  be  in 
  1152.         path.   The  title  used is  "[  Dir:  %s\\%s  ]",path,name.   An 
  1153.         appropriate path and template might be: "A:\\","*.*". 
  1154.  
  1155.         The  file names are displayed once in the order they are found on 
  1156.         the  disk.   (The  same  order with the DIR command  at  the  DOS 
  1157.         prompt.)  The filenames are left justified in their columns  with 
  1158.         a dot separater between the name and extension.
  1159.  
  1160.         Compiler Specifics:
  1161.  
  1162.         None.
  1163.  
  1164.         Return Value:
  1165.  
  1166.         Nothing.
  1167.  
  1168.         See Also:
  1169.  
  1170.  
  1171.  
  1172.         Example:
  1173.  
  1174.         dirwin("C:\\C","*.C");
  1175.  
  1176.  
  1177.                                                                dummy
  1178.         Summary:
  1179.  
  1180.         #include <csrmisc.h>
  1181.  
  1182.         dummy();
  1183.  
  1184.         Created: 04/14/86        Last Updated: 04/14/86
  1185.  
  1186.         Author: Bob Pritchett         Source (C/A): C
  1187.  
  1188.         Located in: CSRMISC.H
  1189.  
  1190.         Requires: Nothing.
  1191.  
  1192.         Description:
  1193.  
  1194.         This is undoubtedly the most useless function in the library, but 
  1195.         it was to easy to exclude.   The macro does absolutly nothing, it 
  1196.         simply  holds a spot during development,  indicating a  function.  
  1197.  
  1198.         Compiler Specifics:
  1199.  
  1200.         None.
  1201.  
  1202.         Return Value:
  1203.  
  1204.         Nothing.
  1205.  
  1206.         See Also:
  1207.  
  1208.  
  1209.  
  1210.         Example:
  1211.  
  1212.         #include <csrmisc.h>
  1213.  
  1214.                             /* Next line shows how it could be used. */ 
  1215.  
  1216.         dummy();       /* This will be the callbak() function call. */
  1217.  
  1218.  
  1219.                                                               ffirst
  1220.         Summary:
  1221.  
  1222.         #include <csrdos.h>      /* Contains struct DIRS, for buf */
  1223.  
  1224.         int ffirst(dir,buf,template,attr);
  1225.         char *dir;               /* Subdir to Use */
  1226.         char *buf;               /* Location to Store Data */
  1227.         char *template;          /* FileName/Template to Search for */
  1228.         int attr;                /* Attribute to Include in Search */
  1229.  
  1230.         Created: 04/04/86        Last Updated: 04/15/86
  1231.  
  1232.         Author: Bob Pritchett         Source (C/A): C
  1233.  
  1234.         Located in: DIRSRCH.OBJ
  1235.  
  1236.         Requires: intdos()
  1237.  
  1238.         Description:
  1239.  
  1240.         Using  DOS 2.0 function 0x4e (2.00 and above only) this  function 
  1241.         begins  the  search for a file in the specified  directory  using 
  1242.         either  a file name or template with wildcard characters ( ?  * ) 
  1243.         as the file to search for.   The path must be a standard DOS path 
  1244.         name (without file name),  using two backslashes instead of  one.  
  1245.         If the path to search is the root, use the path string of "".
  1246.  
  1247.         The  attribute  specified in attr is the attribute to use in  the 
  1248.         search.   If none is specified, then only files are reported.  If 
  1249.         the volume attribute is used,  the volume label is returned.   If 
  1250.         the  sub-directory  attribute is specified,  all files  AND  sub-
  1251.         directories  are returned.   The same applies to the  hidden  and 
  1252.         and  system attributes,  but the archive and read-only attributes 
  1253.         can not be used in searches.
  1254.  
  1255.         After  a  file  is  found it's data is  placed  in  buf  (consult 
  1256.         CSRDOS.H  for  the  DIRS  structure).   The  entry  type  may  be 
  1257.         determined by & ing the returned attribute and the attribute  you 
  1258.         wish to test for, as in   if ( buf.attr & SUBDIR )  would be true 
  1259.         if the entry was a subdirectory.
  1260.  
  1261.         Compiler Specifics:
  1262.  
  1263.         None.
  1264.  
  1265.         Return Value:
  1266.  
  1267.         Returns the value of the AX register,  2 for file not found,  and 
  1268.         18 for no more files to be found.
  1269.  
  1270.         See Also:
  1271.  
  1272.         fnext()
  1273.  
  1274.  
  1275.                                                               ffirst
  1276.  
  1277.  
  1278.  
  1279.  
  1280.         Example:
  1281.  
  1282.         #include <csrdos.h>
  1283.  
  1284.         struct DIRS buf;
  1285.  
  1286.         ffirst("",&buf,"*.SYS",0);      /* Find first .SYS file in root. */
  1287.  
  1288.  
  1289.                                                                fnext
  1290.         Summary:
  1291.  
  1292.         #include <csrdos.h>      /* Contains struct DIRS, for buf */
  1293.  
  1294.         int fnext(dir,buf,template,attr);
  1295.         char *dir;               /* Subdir to Use */
  1296.         char *buf;               /* Location to Store Data */
  1297.         char *template;          /* FileName/Template to Search for */
  1298.         int attr;                /* Attribute to Include in Search */
  1299.  
  1300.         Created: 04/04/86        Last Updated: 04/15/86
  1301.  
  1302.         Author: Bob Pritchett         Source (C/A): C
  1303.  
  1304.         Located in: DIRSRCH.OBJ
  1305.  
  1306.         Requires: intdos()
  1307.  
  1308.         Description:
  1309.  
  1310.         Using  DOS 2.0 function 0x4f (2.00 and above only) this  function 
  1311.         continues  the  search begun with  ffirst().   This  function  is 
  1312.         dependant  upon  information  left in the first 21 bytes  of  the 
  1313.         buffer  used in ffirst,  so use the same buffer,  or begin a  new 
  1314.         sequence with ffirst().
  1315.  
  1316.         Compiler Specifics:
  1317.  
  1318.         None.
  1319.  
  1320.         Return Value:
  1321.  
  1322.         Returns the value of the AX register,  18 for no more files to be 
  1323.         found, or nothing.
  1324.  
  1325.         See Also:
  1326.  
  1327.         ffirst().
  1328.  
  1329.         Example:
  1330.  
  1331.         #include <csrdos.h>
  1332.  
  1333.         int x;
  1334.         struct DIRS buf;
  1335.  
  1336.         ffirst("",&buf,"*.SYS",0);      /* Find first .SYS file in root. */
  1337.  
  1338.         while ( x != 18 )
  1339.          {
  1340.           printf("%s %ld\n",buf.name,buf.size); /* Print name & size. */
  1341.           x = fnext("",&buf,"*.SYS",0); /* Find next entry. */
  1342.          }
  1343.  
  1344.  
  1345.                                                             get_date
  1346.         Summary:
  1347.  
  1348.         int get_date(dy,mn,yr);
  1349.         int *dy;                 /* Location of Day */
  1350.         int *mn;                 /* Location of Month */
  1351.         int *yr;                 /* Location of Year */
  1352.  
  1353.         Created: 03/31/86        Last Updated: 03/31/86
  1354.  
  1355.         Author: Bob Pritchett         Source (C/A): C
  1356.  
  1357.         Located in: GET_DATE.OBJ
  1358.  
  1359.         Requires: intdos()
  1360.  
  1361.         Description:
  1362.  
  1363.         This  routine obtains the current date by using the DOS interrupt 
  1364.         0x2a, and places it into the variables specified.  The day starts 
  1365.         with numbering with 1, and continue to a maximum of 31, the month 
  1366.         is numbered from 1 to 12, and the year is from 1980 to 2099.
  1367.  
  1368.         Compiler Specifics:
  1369.  
  1370.         Compiled  with MSC 3.0,  uses the dosint() function and  register 
  1371.         unions specified in DOS.H.
  1372.  
  1373.         Return Value:
  1374.  
  1375.         Nothing.
  1376.  
  1377.         See Also:
  1378.  
  1379.         get_dow() set_date() get_time()
  1380.  
  1381.         Example:
  1382.  
  1383.         int d;
  1384.         int m;
  1385.         int y;
  1386.  
  1387.         get_date(d,m,y);
  1388.  
  1389.         printf("Today is %d/%d/%d.\n",m,d,y);
  1390.  
  1391.  
  1392.                                                              get_dow
  1393.         Summary:
  1394.  
  1395.         int get_dow();
  1396.  
  1397.         Created: 03/31/86        Last Updated: 03/31/86
  1398.  
  1399.         Author: Bob Pritchett         Source (C/A): C
  1400.  
  1401.         Located in: GET_DOW.OBJ
  1402.  
  1403.         Requires: intdos()
  1404.  
  1405.         Description:
  1406.  
  1407.         This  routine returns the day of the week,  0 for sunday,  1  for 
  1408.         monday, etc.  It is obtained with a DOS interrupt.
  1409.  
  1410.         Compiler Specifics:
  1411.  
  1412.         Compiled  with MSC 3.0,  uses the dosint() function and  register 
  1413.         unions specified in DOS.H.
  1414.  
  1415.         Return Value:
  1416.  
  1417.         Nothing.
  1418.  
  1419.         See Also:
  1420.  
  1421.         get_date() get_time()
  1422.  
  1423.         Example:
  1424.  
  1425.         printf("Today is the %d day of the week.\n",get_dow());
  1426.  
  1427.  
  1428.                                                            get_drive
  1429.         Summary:
  1430.  
  1431.         int get_drive();
  1432.  
  1433.         Created: 04/04/86        Last Updated: 04/04/86
  1434.  
  1435.         Author: Bob Pritchett         Source (C/A): A
  1436.  
  1437.         Located in: GETDRIVE.OBJ
  1438.  
  1439.         Requires: Nothing.
  1440.  
  1441.         Description:
  1442.  
  1443.         This  function returns a single integer representing the  current 
  1444.         logical drive.  The drives are number from 0, as in 0 = A, 1 = B, 
  1445.         2 = C,  etc.   Remember that even with only one floppy,  DOS will 
  1446.         still  have  an A and B drive,  with the single floppy acting  as 
  1447.         both.
  1448.  
  1449.         Compiler Specifics:
  1450.  
  1451.         None.
  1452.  
  1453.         Return Value:
  1454.  
  1455.         The current drive.
  1456.  
  1457.         See Also:
  1458.  
  1459.         set_drive() num_drives()
  1460.  
  1461.         Example:
  1462.  
  1463.         printf("Current Drive is: %c:\n",'A'+get_drive());
  1464.  
  1465.  
  1466.                                                             get_mode
  1467.         Summary:
  1468.  
  1469.         int get_mode();
  1470.  
  1471.         Created: 04/16/86        Last Updated: 04/16/86
  1472.  
  1473.         Author: Bob Pritchett         Source (C/A): C
  1474.  
  1475.         Located in: GETMODE.OBJ
  1476.  
  1477.         Requires: int86()
  1478.  
  1479.         Description:
  1480.  
  1481.         This function returns the current video mode.
  1482.  
  1483.         Compiler Specifics:
  1484.  
  1485.         Other then int86(), none.
  1486.  
  1487.         Return Value:
  1488.  
  1489.         The current video mode.
  1490.  
  1491.         See Also:
  1492.  
  1493.         set_mode()
  1494.  
  1495.         Example:
  1496.  
  1497.         #include <stdio.h>
  1498.  
  1499.         printf("Current video mode is: %d\n",get_mode());
  1500.  
  1501.  
  1502.                                                             get_time
  1503.         Summary:
  1504.  
  1505.         int get_time(hr,mn,sc,hn);
  1506.         int *hr;                 /* Location of Hour */
  1507.         int *mn;                 /* Location of Minutes */
  1508.         int *sc;                 /* Location of Seconds */
  1509.         int *hn;                 /* Location of Hundredths */
  1510.  
  1511.         Created: 03/31/86        Last Updated: 03/31/86
  1512.  
  1513.         Author: Bob Pritchett         Source (C/A): C
  1514.  
  1515.         Located in: GET_TIME.OBJ
  1516.  
  1517.         Requires: intdos()
  1518.  
  1519.         Description:
  1520.  
  1521.         Using  DOS interrupt 0x2c this routine obtains the current  time, 
  1522.         to the hundredths, and places it in the variables specified.  The 
  1523.         time  is given in 24 hour format,  and everything starts counting 
  1524.         at 0, 0 to 23 hours, 0 to 59 seconds etc.
  1525.  
  1526.         Compiler Specifics:
  1527.  
  1528.         Compiled  with MSC 3.0,  uses the dosint() function and  register 
  1529.         unions specified in DOS.H.
  1530.  
  1531.         Return Value:
  1532.  
  1533.         Nothing.
  1534.  
  1535.         See Also:
  1536.  
  1537.         get_dow() get_date() set_time()
  1538.  
  1539.         Example:
  1540.  
  1541.         int h;
  1542.         int m;
  1543.         int s;
  1544.         int hn;
  1545.  
  1546.         get_time(h,m,s,hn);
  1547.  
  1548.         printf("The time is %d:%d:%d.%d.\n",h,m,s,hn);
  1549.  
  1550.  
  1551.                                                               gotoxy
  1552.         Summary:
  1553.  
  1554.         int gotoxy(row,col);
  1555.         int row;                 /* Screen Row */
  1556.         int col;                 /* Screen Column */
  1557.  
  1558.         Created: 00/00/00        Last Updated: 00/00/00
  1559.  
  1560.         Author:                       Source (C/A): A
  1561.  
  1562.         Located in: GOTOXY.OBJ
  1563.  
  1564.         Requires: Nothing
  1565.  
  1566.         Description:
  1567.  
  1568.         The gotoxy function will set the cursor to the screen coordinates 
  1569.         specified  in row and col,  regardless of windows or other  high-
  1570.         level screen manipulation.
  1571.  
  1572.         Service two of the bios video interrupt 0x10 is used.
  1573.  
  1574.         Compiler Specifics:
  1575.  
  1576.         Assembled with calling sequence for MSC 3.0 and  Lattice.   Other 
  1577.         compilers not yet tested.  Standard Microsoft OBJ format.
  1578.  
  1579.         Return Value:
  1580.  
  1581.         This  routine  returns  nothing,  and does not  check  coordinate 
  1582.         validity.
  1583.  
  1584.         See Also:
  1585.  
  1586.         wgotoxy()
  1587.  
  1588.         Example:
  1589.  
  1590.         #include <stdio.h>
  1591.  
  1592.         int row;
  1593.         int col;
  1594.  
  1595.         row = 10;
  1596.         col = 20;
  1597.  
  1598.         gotoxy(row,col);
  1599.  
  1600.         printf("I am now at Column 20 on Row 10.\n");
  1601.  
  1602.  
  1603.                                                               lprint
  1604.         Summary:
  1605.  
  1606.         int lprint(string);
  1607.         char *string;            /* String to Print */
  1608.  
  1609.         Created: 03/10/86        Last Updated: 03/11/86
  1610.  
  1611.         Author: Bob Pritchett         Source (C/A): C
  1612.  
  1613.         Located in: PRINT.OBJ
  1614.  
  1615.         Requires: lputchar()
  1616.  
  1617.         Description:
  1618.  
  1619.         This  function simply prints the string to the printer.   Nothing 
  1620.         other then the standard escape codes are recognized.
  1621.  
  1622.         Compiler Specifics:
  1623.  
  1624.         None.
  1625.  
  1626.         Return Value:
  1627.  
  1628.         Nothing.
  1629.  
  1630.         See Also:
  1631.  
  1632.         wprint()
  1633.  
  1634.         Example:
  1635.  
  1636.         lprint("This string has no formatting at all.\n");
  1637.  
  1638.  
  1639.                                                              lprintf
  1640.         Summary:
  1641.  
  1642.         int lprintf(string[,arguments...]);
  1643.         char *string;            /* Format String to Print */
  1644.  
  1645.         Created: 03/10/86        Last Updated: 03/11/86
  1646.  
  1647.         Author: Bob Pritchett         Source (C/A): C
  1648.  
  1649.         Located in: PRINT.OBJ
  1650.  
  1651.         Requires: Nothing.
  1652.  
  1653.         Description:
  1654.  
  1655.         This function is a version of the familiar printf() function that 
  1656.         prints  directly to the printer.   (Note that DOS function  5  is 
  1657.         used,  it  is  not  done through file  pointers.)   The  argument 
  1658.         formatting should be in the same format as for printf().
  1659.  
  1660.         Compiler Specifics:
  1661.  
  1662.         None.
  1663.  
  1664.         Return Value:
  1665.  
  1666.         Nothing.
  1667.  
  1668.         See Also:
  1669.  
  1670.         wprintf()
  1671.  
  1672.         Example:
  1673.  
  1674.         lprintf("This goes to the printer: %02d %5s\n",6,"Wow");
  1675.  
  1676.  
  1677.                                                             lputchar
  1678.         Summary:
  1679.  
  1680.         int lputchar(c);
  1681.         int c;                   /* Character to Print */
  1682.  
  1683.         Created: 03/10/86        Last Updated: 03/11/86
  1684.  
  1685.         Author: Bob Pritchett         Source (C/A): C
  1686.  
  1687.         Located in: PRINT.OBJ
  1688.  
  1689.         Requires: bdos()
  1690.  
  1691.         Description:
  1692.  
  1693.         Using the bdos call five this routine simply puts the character c 
  1694.         to the printer.  It is called by lprint().
  1695.  
  1696.         Compiler Specifics:
  1697.  
  1698.         None.
  1699.  
  1700.         Return Value:
  1701.  
  1702.         Nothing.
  1703.  
  1704.         See Also:
  1705.  
  1706.         lprint() lprintf()
  1707.  
  1708.         Example:
  1709.  
  1710.         lputchar('\r');
  1711.  
  1712.  
  1713.                                                                match
  1714.         Summary:
  1715.  
  1716.         int match(pat,str,start);
  1717.         char pat[];              /* Pattern to Search for */
  1718.         char str[];              /* String to Search in */
  1719.         int start;               /* Character to Start on */
  1720.  
  1721.         Created: 11/23/85        Last Updated: 11/23/85
  1722.  
  1723.         Author: Bob Pritchett         Source (C/A): C
  1724.  
  1725.         Located in: MATCH.OBJ
  1726.  
  1727.         Requires: strlen()
  1728.  
  1729.         Description:
  1730.  
  1731.         The  match() function searches the string str for the string pat, 
  1732.         and  returns  an integer value of the first place  pat  is  found 
  1733.         within  str.   By  changing the variable start from  it's  normal 
  1734.         useage  as  0,  you may begin the search from a certain place  in 
  1735.         str.   The following wildcards are acceptable within pat:  
  1736.  
  1737.                   #  Any digit from 1-9, and 0
  1738.                   ?  Any character at all
  1739.                   !  Any upper-case letter
  1740.                   ^  Any control character
  1741.  
  1742.         Compiler Specifics:
  1743.  
  1744.         None.
  1745.  
  1746.         Return Value:
  1747.  
  1748.         Returns the first place that pat is found within str.
  1749.  
  1750.         See Also:
  1751.  
  1752.  
  1753.         Example:
  1754.  
  1755.         x = match("a?c","xyzabc",0);  /* x = 3, where abc begins. */
  1756.  
  1757.  
  1758.                                                               mcolor
  1759.         Summary:
  1760.  
  1761.         #include <color.h>       /* For Color Definitions Only */
  1762.  
  1763.         int mcolor(norm,bar);
  1764.         int norm;                /* Color Used for Menu Options */
  1765.         int bar;                 /* Color for Hightlight Bar */
  1766.  
  1767.         Created: 04/16/86        Last Updated: 04/16/86
  1768.  
  1769.         Author: Bob Pritchett         Source (C/A): C
  1770.  
  1771.         Located in: COUTPUT.OBJ
  1772.  
  1773.         Requires: Nothing.
  1774.  
  1775.         Description:
  1776.  
  1777.         This  function sets the colors to be used by pop_menu() and  it's 
  1778.         scrolling highlight bar.  The variable norm contains the complete 
  1779.         attribute for each option, and bar for the highlight bar.
  1780.  
  1781.         Compiler Specifics:
  1782.  
  1783.         None.
  1784.  
  1785.         Return Value:
  1786.  
  1787.         Nothing.
  1788.  
  1789.         See Also:
  1790.  
  1791.         color() wcolor()
  1792.  
  1793.         Example:
  1794.  
  1795.         #include <color.h>
  1796.  
  1797.         mcolor(WHT_F+BLU_B,YEL_F+RED_B);
  1798.  
  1799.  
  1800.                                                           num_drives
  1801.         Summary:
  1802.  
  1803.         int num_drives();
  1804.  
  1805.         Created: 04/06/86        Last Updated: 04/06/86
  1806.  
  1807.         Author: Bob Pritchett         Source (C/A): A
  1808.  
  1809.         Located in: NUMDRVS.OBJ
  1810.  
  1811.         Requires: Nothing.
  1812.  
  1813.         Description:
  1814.  
  1815.         This  function  returns  a single integer value,  the  number  of 
  1816.         logical drives available.   Remember that although this  function 
  1817.         returns the number of available drives, access to these drives is 
  1818.         numbered  from  zero,  so if 3 drives are reported,  the  highest 
  1819.         number that may be accessed is 2.
  1820.  
  1821.         Compiler Specifics:
  1822.  
  1823.         None.
  1824.  
  1825.         Return Value:
  1826.  
  1827.         The total number of logical drives installed.
  1828.  
  1829.         See Also:
  1830.  
  1831.         get_drive() set_drive()
  1832.  
  1833.         Example:
  1834.  
  1835.         printf("%d drives installed.  A: - %c:\n",num_drives(),
  1836.                ( 'A' + ( num_drives() - 1 ) ));
  1837.  
  1838.  
  1839.                                                             pop_menu
  1840.         Summary:
  1841.  
  1842.         int pop_menu(x,y,num,args,title,type);
  1843.         int x;                   /* Row to Start on */
  1844.         int y;                   /* Col to Start on */
  1845.         int num;                 /* Number of Options */
  1846.         char *args[];            /* Function Names */
  1847.         char *title;             /* Menu Title */
  1848.         int type;                /* Window Type */
  1849.  
  1850.         Created: 03/09/86        Last Updated: 03/09/86
  1851.  
  1852.         Author: Bob Pritchett         Source (C/A): C
  1853.  
  1854.         Located in: COUTPUT.OBJ
  1855.  
  1856.         Requires: wopen() wclose() wtitle()
  1857.  
  1858.         Description:
  1859.  
  1860.         This  function  opens  a  window at x,y titled  with  the  string 
  1861.         pointed to by title,  of type border style,  and with num options 
  1862.         stored in args[].   The window's width is the size of the maximum 
  1863.         length option.   The options are printed as sent to the  routine, 
  1864.         but  for  a clean highligh bar,  and better performance  all  the 
  1865.         options should be centered previously in a string.   See the demo 
  1866.         programs for more examples of this.   Also note,  after an option 
  1867.         is selected with the highlight bar,  the it's number is returned, 
  1868.         and the window closed.  You must reopen the menu, this preferably 
  1869.         done  in  a loop[ structure that opens the  menu,  processes  the 
  1870.         resulting  code,  and  then reopens the menu.   This system is  a 
  1871.         simple building block for more advanced menu design.
  1872.  
  1873.         Compiler Specifics:
  1874.  
  1875.         See window notes.
  1876.  
  1877.         Return Value:
  1878.  
  1879.         The number of the option selected with the highlight bar, or a -1 
  1880.         signifying the user aborted the menu with the ESC key.
  1881.  
  1882.         See Also:
  1883.  
  1884.         mcolor()
  1885.  
  1886.  
  1887.                                                             pop_menu
  1888.  
  1889.  
  1890.  
  1891.  
  1892.         Example:
  1893.  
  1894.         #include <color.h>
  1895.  
  1896.         static char *array[] =
  1897.          {
  1898.           " Option 1 ",
  1899.           " Option 2 ",
  1900.           "   Quit   "
  1901.          };
  1902.  
  1903.         main()
  1904.          {
  1905.           int x;
  1906.           cls();
  1907.  
  1908.           while ( 1 )
  1909.            {
  1910.  
  1911.         /* Inside doesn't matter, mcolor() does that, so we use wcolor
  1912.            only to set our border.  Then mcolor() will set our menu
  1913.            colors.  (Color definition in loop in case other routines 
  1914.            change them.) */
  1915.  
  1916.             wcolor(BLK_F,BLU_F+WHT_B);
  1917.             mcolor(YEL_F+RED_B,WHT_F+BLU_B);
  1918.  
  1919.             x = pop_menu(9,27,3,array," Menu ",3);
  1920.             if ( x == 0 )
  1921.                opt1();
  1922.             else if ( x == 1 )
  1923.                opt2();
  1924.             else if ( x == 2 || x == -1 )
  1925.                exit(0);
  1926.            }
  1927.          }
  1928.  
  1929.  
  1930.                                                         print_screen
  1931.         Summary:
  1932.  
  1933.         int print_screen();
  1934.  
  1935.         Created: 03/10/86        Last Updated: 03/10/86
  1936.  
  1937.         Author: Bob Pritchett         Source (C/A): C
  1938.  
  1939.         Located in: PRINT.OBJ
  1940.  
  1941.         Requires: int86()
  1942.  
  1943.         Description:
  1944.  
  1945.         Performing the exact same feature as if you had hit the PrtSc key 
  1946.         while holding the shift key down,  this routine prints the screen 
  1947.         with the bios interrupt five.
  1948.  
  1949.         Compiler Specifics:
  1950.  
  1951.         None.
  1952.  
  1953.         Return Value:
  1954.  
  1955.         Nothing.
  1956.  
  1957.         See Also:
  1958.  
  1959.  
  1960.  
  1961.         Example:
  1962.  
  1963.         print_screen();
  1964.  
  1965.  
  1966.                                                               prtrns
  1967.         Summary:
  1968.  
  1969.         int prtrns(c);
  1970.         int c;                   /* Character to translate */
  1971.  
  1972.         Created: 02/22/86        Last Updated: 02/22/86
  1973.  
  1974.         Author: Bob Pritchett         Source (C/A): C
  1975.  
  1976.         Located in: PRTRNS.C PRTRNS.OBJ
  1977.  
  1978.         Requires: Nothing.
  1979.  
  1980.         Description:
  1981.  
  1982.         This function is a simple one that takes c as an argument, and if 
  1983.         it is a special box drawing character form the extended character 
  1984.         set  it is translated into an equivalent in the lower  127  ASCII 
  1985.         range.   Possibly  useful  in writing a screen or text dump  that 
  1986.         originally contained special characters.
  1987.  
  1988.         Compiler Specifics:
  1989.  
  1990.         None.
  1991.  
  1992.         Return Value:
  1993.  
  1994.         Returns the character, translated if neccessary.
  1995.  
  1996.         See Also:
  1997.  
  1998.  
  1999.  
  2000.         Example:
  2001.  
  2002.         #include <stdio.h>
  2003.  
  2004.         int c = 179;
  2005.  
  2006.         c = prtrns(c);           /* Would return |, replacing 179. */
  2007.  
  2008.         putc(c,stdprn);
  2009.  
  2010.  
  2011.                                                                putat
  2012.         Summary:
  2013.  
  2014.         int putat(x,y,string);
  2015.         int x;                   /* Row to Put At */
  2016.         int y;                   /* Col to Put At */
  2017.         char *string;            /* String to Put */
  2018.  
  2019.         Created: 12/28/85        Last Updated: 12/28/85
  2020.  
  2021.         Author: Bob Pritchett         Source (C/A): C
  2022.  
  2023.         Located in: PUTAT.OBJ
  2024.  
  2025.         Requires: ccputs() putchci()
  2026.  
  2027.         Description:
  2028.  
  2029.         This  function  places the specified string at x,y on the  global 
  2030.         screen.
  2031.  
  2032.         Compiler Specifics:
  2033.  
  2034.         None.
  2035.  
  2036.         Return Value:
  2037.  
  2038.         Nothing.
  2039.  
  2040.         See Also:
  2041.  
  2042.         putatf() wputat() wputatf()
  2043.  
  2044.         Example:
  2045.  
  2046.         putat(10,25,"+ The plus is at 10,25.");
  2047.  
  2048.  
  2049.                                                               putatf
  2050.         Summary:
  2051.  
  2052.         int putatf(x,y,string,args...);
  2053.         int x;                   /* Row to Put At */
  2054.         int y;                   /* Col to Put At */
  2055.         char *string;            /* Formatted String to Put */
  2056.         args...                  /* Formatting Arguments */
  2057.  
  2058.         Created: 05/01/86        Last Updated: 05/01/86
  2059.  
  2060.         Author: Bob Pritchett         Source (C/A): C
  2061.  
  2062.         Located in: PUTATF.OBJ
  2063.  
  2064.         Requires: ccputs() putchci()
  2065.  
  2066.         Description:
  2067.  
  2068.         This  performs the same function as putat() with the addition  of 
  2069.         up to 15 formatting arguments in the same format as printf().
  2070.  
  2071.         Compiler Specifics:
  2072.  
  2073.         None.
  2074.  
  2075.         Return Value:
  2076.  
  2077.         Nothing.
  2078.  
  2079.         See Also:
  2080.  
  2081.         putat() wputat() wputatf()
  2082.  
  2083.         Example:
  2084.  
  2085.         putatf(10,25,"+ The plus %s at %d,%d.","is",10,25);
  2086.  
  2087.  
  2088.                                                              putchci
  2089.         Summary:
  2090.  
  2091.         int putchci(c,color);
  2092.         int c;                   /* Character to Print */
  2093.         int color;               /* Attribute to Use */
  2094.  
  2095.         Created: 12/28/85        Last Updated: 12/28/85
  2096.  
  2097.         Author: Bob Pritchett         Source (C/A): A
  2098.  
  2099.         Located in: PUTCHCI.OBJ
  2100.  
  2101.         Requires: Nothing.
  2102.  
  2103.         Description:
  2104.  
  2105.         This simply outputs the character c, using the color in color, to 
  2106.         the video memory, and then increments the cursor.
  2107.  
  2108.         Compiler  Specifics:
  2109.  
  2110.         None. 
  2111.  
  2112.         Return Value:
  2113.  
  2114.         Nothing.
  2115.  
  2116.         See Also:
  2117.  
  2118.         wputchar()
  2119.  
  2120.         Example:
  2121.  
  2122.         #include <color.h>
  2123.  
  2124.         putchci('A',RED_F+BLK_B);     /* Put out an A in red. */
  2125.  
  2126.  
  2127.                                                              restore
  2128.         Summary:
  2129.  
  2130.         int restore(x,y,x2,y2,array);
  2131.         int x;                   /* Upper Left Row */
  2132.         int y;                   /* Upper Left Col */
  2133.         int x2;                  /* Lower Right Row */
  2134.         int y2;                  /* Lower Right Col */
  2135.         char *array;             /* Array to Store Screen In */
  2136.  
  2137.         Created: 03/03/86        Last Updated: 03/03/86
  2138.  
  2139.         Author: Bob Pritchett         Source (C/A): C
  2140.  
  2141.         Located in: COUTPUT.OBJ
  2142.  
  2143.         Requires: Nothing.
  2144.  
  2145.         Description:
  2146.  
  2147.         This function restores the portion of the screen previously saved 
  2148.         by save() in array at the coordinates which are specified,  which 
  2149.         don't have to be the same as those at which it was saved.
  2150.  
  2151.         Compiler  Specifics:
  2152.  
  2153.         The MSC function movedata() was used. 
  2154.  
  2155.         Return Value:
  2156.  
  2157.         Nothing is returned and there are no validity checks.   Giving  a 
  2158.         set of bad coordinates will generate unknown results. 
  2159.  
  2160.         See Also:
  2161.  
  2162.         save() restore_screen()
  2163.  
  2164.         Example:
  2165.  
  2166.         char *temp;
  2167.         temp = malloc(4000);     /* Size of screen and attributes. */
  2168.  
  2169.         save(0,0,24,79,temp);    /* Save whole screen. */
  2170.  
  2171.         restore(0,0,24,79,temp); /* Restore screen. */
  2172.  
  2173.  
  2174.                                                       restore_cursor
  2175.         Summary:
  2176.  
  2177.         int restore_cursor();
  2178.  
  2179.         Created: 02/22/86        Last Updated: 02/24/86
  2180.  
  2181.         Author: Bob Pritchett         Source (C/A): C
  2182.  
  2183.         Located in: CURSOR.OBJ
  2184.  
  2185.         Requires: int86()
  2186.  
  2187.         Description:
  2188.  
  2189.         This  function  will return the cursor to the location it was  at 
  2190.         when save_cursor() was called.
  2191.  
  2192.         Compiler Specifics:
  2193.  
  2194.         Problems associated with int86() only.
  2195.  
  2196.         Return Value:
  2197.  
  2198.         Nothing.
  2199.  
  2200.         See Also:
  2201.  
  2202.         save_cursor() restore_screen()
  2203.  
  2204.         Example:
  2205.  
  2206.         save_cursor();
  2207.  
  2208.         restore_cursor();
  2209.  
  2210.  
  2211.                                                       restore_screen
  2212.         Summary:
  2213.  
  2214.         int restore_screen();
  2215.  
  2216.         Created: 03/09/86        Last Updated: 03/09/86
  2217.  
  2218.         Author: Bob Pritchett         Source (C/A): C
  2219.  
  2220.         Located in: COUTPUT.OBJ
  2221.  
  2222.         Requires: restore()
  2223.  
  2224.         Description:
  2225.  
  2226.         This  function  restores  the screen  saved  with  save_screen().  
  2227.         Useful  for  restoring  the screen present  when  a  program  was 
  2228.         invoked after it finishes executing.
  2229.  
  2230.         Compiler Specifics:
  2231.  
  2232.         None.
  2233.  
  2234.         Return Value:
  2235.  
  2236.         Nothing.
  2237.  
  2238.         See Also:
  2239.  
  2240.         save_screen() restore_cursor()
  2241.  
  2242.         Example:
  2243.  
  2244.         main()
  2245.          {
  2246.           save_screen();
  2247.  
  2248.           /* Etc... */
  2249.  
  2250.           restore_screen();
  2251.           exit(0);
  2252.          }
  2253.  
  2254.  
  2255.                                                                 save
  2256.         Summary:
  2257.  
  2258.         int save(x,y,x2,y2,array);
  2259.         int x;                   /* Upper Left Row */
  2260.         int y;                   /* Upper Left Col */
  2261.         int x2;                  /* Lower Right Row */
  2262.         int y2;                  /* Lower Right Col */
  2263.         char *array;             /* Array to Store Screen In */
  2264.  
  2265.         Created: 03/03/86        Last Updated: 03/03/86
  2266.  
  2267.         Author: Bob Pritchett         Source (C/A): C
  2268.  
  2269.         Located in: COUTPUT.OBJ
  2270.  
  2271.         Requires: Nothing.
  2272.  
  2273.         Description:
  2274.  
  2275.         This  function  saves the portion of the screen specified by  the 
  2276.         four coordinates into array.   No other action is taken,  and the 
  2277.         screen is not erased within that area.
  2278.  
  2279.         Compiler  Specifics:
  2280.  
  2281.         The MSC function movedata() was used. 
  2282.  
  2283.         Return Value:
  2284.  
  2285.         Nothing is returned and there are no validity checks.   Giving  a 
  2286.         set of bad coordinates will generate unknown results. 
  2287.  
  2288.         See Also:
  2289.  
  2290.         restore() save_screen()
  2291.  
  2292.         Example:
  2293.  
  2294.         char *temp;
  2295.         temp = malloc(4000);     /* Size of screen and attributes. */
  2296.  
  2297.         save(0,0,24,79,temp);    /* Save whole screen. */
  2298.  
  2299.         restore(0,0,24,79,temp); /* Restore screen. */
  2300.  
  2301.  
  2302.                                                          save_cursor
  2303.         Summary:
  2304.  
  2305.         int save_cursor();
  2306.  
  2307.         Created: 02/22/86        Last Updated: 02/24/86
  2308.  
  2309.         Author: Bob Pritchett         Source (C/A): C
  2310.  
  2311.         Located in: CURSOR.OBJ
  2312.  
  2313.         Requires: int86()
  2314.  
  2315.         Description:
  2316.  
  2317.         This  funciton  will  save  the current  cursor  position  in  an 
  2318.         internal  variable  for  restoration with restore_cursor()  at  a 
  2319.         later time.
  2320.  
  2321.         Compiler Specifics:
  2322.  
  2323.         int86().
  2324.  
  2325.         Return Value:
  2326.  
  2327.         Nothing.
  2328.  
  2329.         See Also:
  2330.  
  2331.         restore_cursor()
  2332.  
  2333.         Example:
  2334.  
  2335.         save_cursor();           /* Save it here... */
  2336.  
  2337.         printf("This is a string of text...");
  2338.  
  2339.         restore_cursor();        /* To the beginning of the line... */ 
  2340.  
  2341.  
  2342.                                                          save_screen
  2343.         Summary:
  2344.  
  2345.         int save_screen();
  2346.  
  2347.         Created: 03/09/86        Last Updated: 03/09/86
  2348.  
  2349.         Author: Bob Pritchett         Source (C/A): C
  2350.  
  2351.         Located in: COUTPUT.OBJ
  2352.  
  2353.         Requires: save()
  2354.  
  2355.         Description:
  2356.  
  2357.         This  function saves the current screen and attributes for  later 
  2358.         restoration with the restore_screen() function.
  2359.  
  2360.         Compiler Specifics:
  2361.  
  2362.         None.
  2363.  
  2364.         Return Value:
  2365.  
  2366.         Nothing.
  2367.  
  2368.         See Also:
  2369.  
  2370.         save_cursor() restore_screen()
  2371.  
  2372.         Example:
  2373.  
  2374.         main()
  2375.          {
  2376.           save_screen();
  2377.  
  2378.           /* Etc... */
  2379.  
  2380.           restore_screen();
  2381.           exit(0);
  2382.          }
  2383.  
  2384.  
  2385.                                                               scroll
  2386.         Summary:
  2387.  
  2388.         int scroll(x,y,x2,y2,dir,num);
  2389.         int x;                   /* Upper Left Row */
  2390.         int y;                   /* Upper Left Col */
  2391.         int x2;                  /* Lower Right Row */
  2392.         int y2;                  /* Lower Right Col */
  2393.         int dir;                 /* 0 - Up / 1 - Down */
  2394.         int num;                 /* Number of Lines */
  2395.  
  2396.         Created: 03/03/86        Last Updated: 03/03/86
  2397.  
  2398.         Author: Bob Pritchett         Source (C/A): C
  2399.  
  2400.         Located in: COUTPUT.OBJ
  2401.  
  2402.         Requires: int86()
  2403.  
  2404.         Description:
  2405.  
  2406.         This function scrolls the area inside and including the specified 
  2407.         coordinates  in  the  specified  window.   The  number  of  lines 
  2408.         scrolled  is determined by the value of num and setting num to  0 
  2409.         and  the  direction  0,  up,  will  cause  the  window  to  clear 
  2410.         completly.
  2411.  
  2412.         Compiler Specifics:
  2413.  
  2414.         None other then int86() related.
  2415.  
  2416.         Return Value:
  2417.  
  2418.         Nothing.
  2419.  
  2420.         See Also:
  2421.  
  2422.         wscroll()
  2423.  
  2424.         Example:
  2425.  
  2426.         scroll(0,0,24,80,0,0);        /* Clear the whole screen. */
  2427.  
  2428.  
  2429.                                                             set_date
  2430.         Summary:
  2431.  
  2432.         int set_date(dy,mn,yr);
  2433.         int dy;                  /* Day */
  2434.         int mn;                  /* Month */
  2435.         int yr;                  /* Year */
  2436.  
  2437.         Created: 03/31/86        Last Updated: 03/31/86
  2438.  
  2439.         Author: Bob Pritchett         Source (C/A): C
  2440.  
  2441.         Located in: SET_DATE.OBJ
  2442.  
  2443.         Requires: intdos()
  2444.  
  2445.         Description:
  2446.  
  2447.         Using the DOS interrupts this routine sets the date as  specified 
  2448.         in   the  three  parameters.    For  more  information  see   the 
  2449.         description of get_date();
  2450.  
  2451.         Compiler Specifics:
  2452.  
  2453.         Compiled  with MSC 3.0,  uses the dosint() function and  register 
  2454.         unions specified in DOS.H.
  2455.  
  2456.         Return Value:
  2457.  
  2458.         Nothing.
  2459.  
  2460.         See Also:
  2461.  
  2462.         get_dow() get_date() set_time()
  2463.  
  2464.         Example:
  2465.  
  2466.         int d = 4;
  2467.         int m = 7;
  2468.         int y = 1987;
  2469.  
  2470.         set_date(d,m,y);    /* Fourth of July, 1987. */
  2471.  
  2472.  
  2473.                                                            set_drive
  2474.         Summary:
  2475.  
  2476.         int set_drive(x);
  2477.         int x;                   /* Drive Numer to Set to */
  2478.  
  2479.         Created: 04/06/86        Last Updated: 04/06/86
  2480.  
  2481.         Author: Bob Pritchett         Source (C/A): A
  2482.  
  2483.         Located in: SETDRIVE.OBJ
  2484.  
  2485.         Requires: Nothing.
  2486.  
  2487.         Description:
  2488.  
  2489.         This  function sets the current drive to the number specified  by 
  2490.         x.  For an explanation of numbering conventions, see get_drive().
  2491.  
  2492.         Compiler Specifics:
  2493.  
  2494.         None.
  2495.  
  2496.         Return Value:
  2497.  
  2498.         Nothing.
  2499.  
  2500.         See Also:
  2501.  
  2502.         get_drive() num_drives()
  2503.  
  2504.         Example:
  2505.  
  2506.         if ( num_drives() != 1 ) /* If we have more then 2 logical */
  2507.            set_drive(2);         /* Make the current the first HD, C: */
  2508.         else
  2509.            set_drive(0);         /* Else make it A: */
  2510.  
  2511.  
  2512.                                                             set_mode
  2513.         Summary:
  2514.  
  2515.         #include <csrmodes.h>    /* For Declarations Only */
  2516.  
  2517.         int set_mode(x);
  2518.         int x;                   /* Video Mode to Set to */
  2519.  
  2520.         Created: 05/03/86        Last Updated: 05/03/86
  2521.  
  2522.         Author: Bob Pritchett         Source (C/A): C
  2523.  
  2524.         Located in: SETMODE.OBJ
  2525.  
  2526.         Requires: int86()
  2527.  
  2528.         Description:
  2529.  
  2530.         This function sets the video mode as specified in x.   Please see 
  2531.         CSRMODES.H for a description of these modes.
  2532.  
  2533.         Compiler Specifics:
  2534.  
  2535.         None other then int86() related.
  2536.  
  2537.         Return Value:
  2538.  
  2539.         Nothing.
  2540.  
  2541.         See Also:
  2542.  
  2543.         get_mode()
  2544.  
  2545.         Example:
  2546.  
  2547.         #include <csrmodes.h>
  2548.  
  2549.         set_mode(CO80);          /* 80 Columns - Color */
  2550.  
  2551.  
  2552.                                                             set_time
  2553.         Summary:
  2554.  
  2555.         int set_time(hr,mn,sc,hn);
  2556.         int hr;                  /* Hour */
  2557.         int mn;                  /* Minutes */
  2558.         int sc;                  /* Seconds */
  2559.         int hn;                  /* Hundredths */
  2560.  
  2561.         Created: 03/31/86        Last Updated: 03/31/86
  2562.  
  2563.         Author: Bob Pritchett         Source (C/A): C
  2564.  
  2565.         Located in: SET_TIME.OBJ
  2566.  
  2567.         Requires: intdos()
  2568.  
  2569.         Description:
  2570.  
  2571.         This routine uses DOS to set the current time as specified.   For 
  2572.         more information see the description of get_time().
  2573.  
  2574.         Compiler Specifics:
  2575.  
  2576.         Compiled  with MSC 3.0,  uses the dosint() function and  register 
  2577.         unions specified in DOS.H.
  2578.  
  2579.         Return Value:
  2580.  
  2581.         Nothing.
  2582.  
  2583.         See Also:
  2584.  
  2585.         get_dow() set_date() get_time()
  2586.  
  2587.         Example:
  2588.  
  2589.         int h = 3;
  2590.         int m = 15;
  2591.         int s = 0;
  2592.         int hn = 0;
  2593.  
  2594.         set_time(h,m,s,hn);       /* Set the time to 3:15am. */
  2595.  
  2596.  
  2597.                                                                timer
  2598.         Summary:
  2599.  
  2600.         int timer();
  2601.  
  2602.         Created: 04/14/86        Last Updated: 04/14/86
  2603.  
  2604.         Author: Unknown               Source (C/A): C
  2605.  
  2606.         Located in: TIMER.OBJ
  2607.  
  2608.         Requires: int86()
  2609.  
  2610.         Description:
  2611.  
  2612.         This  routine  will return an integer representing the number  of 
  2613.         clock ticks since the last call.   Remember that there are  about 
  2614.         18.2 ticks per second.
  2615.  
  2616.         Compiler Specifics:
  2617.  
  2618.         None.
  2619.  
  2620.         Return Value:
  2621.  
  2622.         The number of ticks since last call.
  2623.  
  2624.         See Also:
  2625.  
  2626.  
  2627.  
  2628.         Example:
  2629.  
  2630.         timer();            /* Start count... */
  2631.         routiner();
  2632.         printf("routine() took %d ticks to execute.\n",timer());
  2633.  
  2634.  
  2635.                                                            wactivate
  2636.         Summary:
  2637.  
  2638.         int wactivate(wind);
  2639.         int wind;                /* Pointer to Window to Activate */
  2640.  
  2641.         Created: 03/03/86        Last Updated: 03/09/86
  2642.  
  2643.         Author: Bob Pritchett         Source (C/A): C
  2644.  
  2645.         Located in: COUTPUT.OBJ
  2646.  
  2647.         Requires: Nothing.
  2648.  
  2649.         Description:
  2650.  
  2651.         This  function activates the specified window.   If the window is 
  2652.         overlayed  by  other windows it is brought out  from  behind  and 
  2653.         becomes the active window, on top of the other and uncovered.
  2654.  
  2655.         Compiler Specifics:
  2656.  
  2657.         Compiled with MSC.  See window notes.
  2658.  
  2659.         Return Value:
  2660.  
  2661.         Nothing.
  2662.  
  2663.         See Also:
  2664.  
  2665.         wclose() wopen()
  2666.  
  2667.         Example:
  2668.  
  2669.         wactivate(w3);                /* Activate an opened window */
  2670.  
  2671.  
  2672.                                                              wborder
  2673.         Summary:
  2674.  
  2675.         int wborder(num,type);
  2676.         int num;                 /* Number of Window to Use */
  2677.         int type;                /* Type of Window Border to Use */
  2678.  
  2679.         Created: 04/25/86        Last Updated: 04/25/86
  2680.  
  2681.         Author: Bob Pritchett         Source (C/A): C
  2682.  
  2683.         Located in: COUTPUT.OBJ
  2684.  
  2685.         Requires: Nothing.
  2686.  
  2687.         Description:
  2688.  
  2689.         This function redraws the border of a window, using whatever type 
  2690.         is  specified,  and the colors stored for this window.   The most 
  2691.         useful  purpose is to 'erase' wtitle() and  wmessage()  messages, 
  2692.         and to change the style of the border.
  2693.  
  2694.         Compiler Specifics:
  2695.  
  2696.         Compiled with MSC.  See window notes.
  2697.  
  2698.         Return Value:
  2699.  
  2700.         Nothing.
  2701.  
  2702.         See Also:
  2703.  
  2704.         wcolor()
  2705.  
  2706.         Example:
  2707.  
  2708.         wborder(win,4);
  2709.  
  2710.  
  2711.                                                               wblank
  2712.         Summary:
  2713.  
  2714.         int wblank(wind,row);
  2715.         int wind;                /* Pointer to Window to Use */
  2716.         int row;                 /* Row to Clear */
  2717.  
  2718.         Created: 04/30/86        Last Updated: 04/30/86
  2719.  
  2720.         Author: Bob Pritchett         Source (C/A): C
  2721.  
  2722.         Located in: COUTPUT.OBJ
  2723.  
  2724.         Requires: Nothing.
  2725.  
  2726.         Description:
  2727.  
  2728.         This  function will erase the specified row within the  specified 
  2729.         window by deleting then inserting that row.   The cursor is place 
  2730.         at column 0 in this row.
  2731.  
  2732.         Compiler Specifics:
  2733.  
  2734.         Compiled with MSC.  See window notes.
  2735.  
  2736.         Return Value:
  2737.  
  2738.         Nothing.
  2739.  
  2740.         See Also:
  2741.  
  2742.         winsert() wdelete()
  2743.  
  2744.         Example:
  2745.  
  2746.         wblank(win,3);
  2747.  
  2748.  
  2749.                                                              wcenter
  2750.         Summary:
  2751.  
  2752.         int wcenter(win,x,str);
  2753.         int win;                 /* Window to Use */
  2754.         int x;                   /* Line to Center on */
  2755.         char *str;               /* String to Center */
  2756.  
  2757.         Created: 03/03/86        Last Updated: 03/03/86
  2758.  
  2759.         Author: Bob Pritchett         Source (C/A): C
  2760.  
  2761.         Located in: WCENTER.OBJ
  2762.  
  2763.         Requires: wgotoxy() wprint()
  2764.  
  2765.         Description:
  2766.  
  2767.         This  routine is functionally the same as center() except that  x 
  2768.         is a line within the specified window, and the string is centered 
  2769.         in window coordinates,  not global.  The window's inside color is 
  2770.         used.
  2771.  
  2772.         Compiler Specifics:
  2773.  
  2774.         None.
  2775.  
  2776.         Return Value:
  2777.  
  2778.         Nothing.
  2779.  
  2780.         See Also:
  2781.  
  2782.         wcenterf() center()
  2783.  
  2784.         Example:
  2785.  
  2786.         wcenter(w3,5,"This is centered in window 3.");
  2787.  
  2788.  
  2789.                                                             wcenterf
  2790.         Summary:
  2791.  
  2792.         int wcenterf(win,x,str[,arguments...]);
  2793.         int win;                 /* Window to Use */
  2794.         int x;                   /* Line to Center on */
  2795.         char *str;               /* String to Center */
  2796.  
  2797.         Created: 04/13/86        Last Updated: 04/13/86
  2798.  
  2799.         Author: Bob Pritchett         Source (C/A): C
  2800.  
  2801.         Located in: WCENTERF.OBJ
  2802.  
  2803.         Requires: wgotoxy() wprint()
  2804.  
  2805.         Description:
  2806.  
  2807.         Just like centerf() only in the specified window.
  2808.  
  2809.         Compiler Specifics:
  2810.  
  2811.         None.
  2812.  
  2813.         Return Value:
  2814.  
  2815.         Nothing.
  2816.  
  2817.         See Also:
  2818.  
  2819.         center() centerf() wcenter()
  2820.  
  2821.         Example:
  2822.  
  2823.         wcenterf(w3,5,"This is %s in window 3.","centered");
  2824.  
  2825.  
  2826.                                                               wclose
  2827.         Summary:
  2828.  
  2829.         int wclose(wind);
  2830.         int wind;                /* Pointer to Window to Close */
  2831.  
  2832.         Created: 03/03/86        Last Updated: 03/09/86
  2833.  
  2834.         Author: Bob Pritchett         Source (C/A): C
  2835.  
  2836.         Located in: COUTPUT.OBJ
  2837.  
  2838.         Requires: Nothing.
  2839.  
  2840.         Description:
  2841.  
  2842.         This  function  closes  a  video window  previously  opened  with 
  2843.         wopen().   The  portion of the screen that was covered with   the 
  2844.         window is restored.  NOTE:  You may close a window other then the 
  2845.         active one, it will be acitivated and properly closed.
  2846.  
  2847.         Compiler Specifics:
  2848.  
  2849.         Compiled with MSC.  See window notes.
  2850.  
  2851.         Return Value:
  2852.  
  2853.         Nothing.
  2854.  
  2855.         See Also:
  2856.  
  2857.         wcloseall() wopen() wactivate()
  2858.  
  2859.         Example:
  2860.  
  2861.         int w;
  2862.  
  2863.         w = wopen(10,10,20,70,2);     /* Open a large window */ 
  2864.  
  2865.         wclose(w);                    /* Restore covered screen area */
  2866.  
  2867.  
  2868.                                                            wcloseall
  2869.         Summary:
  2870.  
  2871.         int wcloseall();
  2872.  
  2873.         Created: 03/03/86        Last Updated: 03/09/86
  2874.  
  2875.         Author: Bob Pritchett         Source (C/A): C
  2876.  
  2877.         Located in: COUTPUT.OBJ
  2878.  
  2879.         Requires: Nothing.
  2880.  
  2881.         Description:
  2882.  
  2883.         This  function closes all the open windows by repeatedly  calling 
  2884.         wclose().   The active window is closed first,  and so on all the 
  2885.         way down the stack.
  2886.  
  2887.         Compiler Specifics:
  2888.  
  2889.         Compiled with MSC.  See window notes.
  2890.  
  2891.         Return Value:
  2892.  
  2893.         Nothing.
  2894.  
  2895.         See Also:
  2896.  
  2897.         wclose() wopen() wactivate()
  2898.  
  2899.         Example:
  2900.  
  2901.         int w;
  2902.         int w2;
  2903.  
  2904.         w = wopen(10,10,20,70,2);     /* Open a large window */ 
  2905.         w2 = wopen(5,5,17,54,3);
  2906.  
  2907.         wcloseall();                  /* Restore covered screen area */
  2908.  
  2909.  
  2910.                                                                 wcls
  2911.         Summary:
  2912.  
  2913.         int wcls(num);
  2914.  
  2915.         Created: 03/03/86        Last Updated: 03/09/86
  2916.  
  2917.         Author: Bob Pritchett         Source (C/A): C
  2918.  
  2919.         Located in: COUTPUT.OBJ
  2920.  
  2921.         Requires: Nothing.
  2922.  
  2923.         Description:
  2924.  
  2925.         This  routine  will clear the specified window with it's  current 
  2926.         interior  attributes.   If  not active the  cleared  window  will 
  2927.         become the foremost window.
  2928.  
  2929.         Compiler Specifics:
  2930.  
  2931.         Compiled with MSC.  See window notes.
  2932.  
  2933.         Return Value:
  2934.  
  2935.         Nothing.
  2936.  
  2937.         See Also:
  2938.  
  2939.         cls() ccls()
  2940.  
  2941.         Example:
  2942.  
  2943.         wcls(win);          /* Clear window win. */
  2944.  
  2945.  
  2946.                                                                 wcol
  2947.         Summary:
  2948.  
  2949.         int wcol(wind);
  2950.         int wind;                /* Pointer to Window to Use */
  2951.  
  2952.         Created: 03/03/86        Last Updated: 03/09/86
  2953.  
  2954.         Author: Bob Pritchett         Source (C/A): C
  2955.  
  2956.         Located in: COUTPUT.OBJ
  2957.  
  2958.         Requires: Nothing.
  2959.  
  2960.         Description:
  2961.  
  2962.         This  function returns the number of the highest col in a window.  
  2963.         If a window has siz columns,  numbered zero to five,  wcol() will 
  2964.         return a five.  Mostly an internal routine.
  2965.  
  2966.         Compiler Specifics:
  2967.  
  2968.         Compiled with MSC.  See window notes.
  2969.  
  2970.         Return Value:
  2971.  
  2972.         Nothing.
  2973.  
  2974.         See Also:
  2975.  
  2976.         wrow()
  2977.  
  2978.         Example:
  2979.  
  2980.         x = wcol(w3);            /* Returns the number of highest row */
  2981.  
  2982.  
  2983.                                                               wcolor
  2984.         Summary:
  2985.  
  2986.         int wcolor(insd,bord);
  2987.         int insd;                /* Color For Window Interior */
  2988.         int bord;                /* Color For Window Border */
  2989.  
  2990.         Created: 03/03/86        Last Updated: 03/09/86
  2991.  
  2992.         Author: Bob Pritchett         Source (C/A): C
  2993.  
  2994.         Located in: COUTPUT.OBJ
  2995.  
  2996.         Requires: Nothing.
  2997.  
  2998.         Description:
  2999.  
  3000.         This  routine sets the current colors for the inside and  outside 
  3001.         of  windows.   These  are  the  defaults used when  a  window  is 
  3002.         created.   The difference between color() and wcolor()  primarily 
  3003.         is that color has two arguments,  the fore and background colors, 
  3004.         and  wcolor  makes you add the fore and back into one number  for 
  3005.         both the inside and border colors.   Also,  the color()  function 
  3006.         sets  both  border and inside attributes to be  the  same,  while 
  3007.         wcolor() allows them to be set to different values.
  3008.  
  3009.         Compiler Specifics:
  3010.  
  3011.         Compiled with MSC.  See window notes.
  3012.  
  3013.         Return Value:
  3014.  
  3015.         Nothing.
  3016.  
  3017.         See Also:
  3018.  
  3019.         color()
  3020.  
  3021.         Example:
  3022.  
  3023.         wcolor(WHT_F+BLU_B,BLU_F+WHT_F); 
  3024.              /* Inside is white on blue, border is blue on white. */
  3025.  
  3026.  
  3027.                                                              wdelete
  3028.         Summary:
  3029.  
  3030.         int wdelete(num,row,tms)
  3031.         int num;                 /* Pointer to Window to Use */
  3032.         int row;                 /* Row to Delete Line Before */
  3033.         int tms;                 /* Number of Lines to Delete */
  3034.  
  3035.         Created: 04/30/86        Last Updated: 04/30/86
  3036.  
  3037.         Author: Bob Pritchett         Source (C/A): C
  3038.  
  3039.         Located in: COUTPUT.OBJ
  3040.  
  3041.         Requires: Nothing.
  3042.  
  3043.         Description:
  3044.  
  3045.         This  routine deletes tms lines starting with the line number  in 
  3046.         row, and moves all lower lines up, making blanks at the bottom of 
  3047.         the window.
  3048.  
  3049.         Compiler Specifics:
  3050.  
  3051.         Compiled with MSC.  See window notes.
  3052.  
  3053.         Return Value:
  3054.  
  3055.         Nothing.
  3056.  
  3057.         See Also:
  3058.  
  3059.         winsert() wblank()
  3060.  
  3061.         Example:
  3062.  
  3063.         wdelete(win,2,4);   /* Delete 4 line starting with line 2,
  3064.                                so line 6 becomes line 2 etc. */
  3065.  
  3066.  
  3067.                                                              wfreeze
  3068.         Summary:
  3069.  
  3070.         int wfreeze(num,top,bot);
  3071.         int num;                 /* Pointer to Window to Use */
  3072.         int top;                 /* First Scrollable Line */
  3073.         int bot;                 /* Last Scrollable Line */
  3074.  
  3075.         Created: 04/16/86        Last Updated: 04/16/86
  3076.  
  3077.         Author: Bob Pritchett         Source (C/A): C
  3078.  
  3079.         Located in: COUTPUT.OBJ
  3080.  
  3081.         Requires: Nothing.
  3082.  
  3083.         Description:
  3084.  
  3085.         This  routine  allows  you to set the scrollable lines  within  a 
  3086.         window.  When text a newline is printed on the last line inside a 
  3087.         window, the text scrolls up.  This routine allows you to 'freeze' 
  3088.         a  number  of lines at the top and bottom  of  the  window.   The 
  3089.         numbers  specified are the first and last scrollable  lines,  and 
  3090.         the default, full window, values are 0 and wrow(num).
  3091.  
  3092.         No error checking is performed on the values.
  3093.  
  3094.         The wcls() routine will only clear scrollable lines,  and whome() 
  3095.         will  home  the  cursor  to  the first  character  on  the  first 
  3096.         scrollable line.   Reset the wfreeze() values to 0 and  wrow(num) 
  3097.         to clear an entire window.
  3098.  
  3099.         Compiler Specifics:
  3100.  
  3101.         Compiled with MSC.  See window notes.
  3102.  
  3103.         Return Value:
  3104.  
  3105.         Nothing.
  3106.  
  3107.         See Also:
  3108.  
  3109.  
  3110.  
  3111.         Example:
  3112.  
  3113.         wfreeze(w2,2,wrow(w2)-3);     /* Freeze lines 0-1 at top, and the
  3114.                                          bottom three lines. */
  3115.  
  3116.  
  3117.                                                              wgotoxy
  3118.         Summary:
  3119.  
  3120.         int wgotoxy(num,row,col);
  3121.         int num;                 /* Pointer to Window to Use */
  3122.         int row;                 /* Row In Window to Go To */
  3123.         int col;                 /* Col In Window to Go To */
  3124.  
  3125.         Created: 03/03/86        Last Updated: 04/16/86
  3126.  
  3127.         Author: Bob Pritchett         Source (C/A): C
  3128.  
  3129.         Located in: COUTPUT.OBJ
  3130.  
  3131.         Requires: Nothing.
  3132.  
  3133.         Description:
  3134.  
  3135.         This routine perfomrs the same function as gotoxy() within window 
  3136.         coordinates.   Remember that as on the screen, window coordinates 
  3137.         start numbering at 0,0.
  3138.  
  3139.         Compiler Specifics:
  3140.  
  3141.         Compiled with MSC.  See window notes.
  3142.  
  3143.         Return Value:
  3144.  
  3145.         Nothing.
  3146.  
  3147.         See Also:
  3148.  
  3149.         gotoxy() whome()
  3150.  
  3151.         Example:
  3152.  
  3153.         wgotoxy(w1,2,4);        /* Put cursor at 2,4 in window 1. */
  3154.  
  3155.  
  3156.                                                               whline
  3157.         Summary:
  3158.  
  3159.         int whline(wind,row);
  3160.         int wind;                /* Window to Draw in */
  3161.         int row;                 /* Row to Draw Line on */
  3162.  
  3163.         Created: 03/03/86        Last Updated: 03/03/86
  3164.  
  3165.         Author: Bob Pritchett         Source (C/A): C
  3166.  
  3167.         Located in: COUTPUT.OBJ
  3168.  
  3169.         Requires: chline()
  3170.  
  3171.         Description:
  3172.  
  3173.         This  function calls chline() with the correct parameters to draw 
  3174.         a  horizontal line in the specified window.   The correct  colors 
  3175.         and border styles are used.
  3176.  
  3177.         Compiler Specifics:
  3178.  
  3179.         None.
  3180.  
  3181.         Return Value:
  3182.  
  3183.         Nothing.
  3184.  
  3185.         See Also:
  3186.  
  3187.         chline() wvline()
  3188.  
  3189.         Example:
  3190.  
  3191.         #include <color.h>       /* Just for the colors... */
  3192.  
  3193.         int w;
  3194.  
  3195.         w = wopen(5,5,20,60,1);  /* A box with a single line border */
  3196.  
  3197.         whline(w,7);        /* Draws a line across the box */
  3198.  
  3199.  
  3200.                                                                whome
  3201.         Summary:
  3202.  
  3203.         int whome(num);
  3204.         int num;                 /* Pointer to Window to Use */
  3205.  
  3206.         Created: 04/20/86        Last Updated: 04/20/86
  3207.  
  3208.         Author: Bob Pritchett         Source (C/A): C
  3209.  
  3210.         Located in: COUTPUT.OBJ
  3211.  
  3212.         Requires: Nothing.
  3213.  
  3214.         Description:
  3215.  
  3216.         This routine homes the cursor to the same coordinates as would be 
  3217.         used  in a window clear with wcls(),  the upper  left  scrollable 
  3218.         character in the specified window.
  3219.  
  3220.         Compiler Specifics:
  3221.  
  3222.         Compiled with MSC.  See window notes.
  3223.  
  3224.         Return Value:
  3225.  
  3226.         Nothing.
  3227.  
  3228.         See Also:
  3229.  
  3230.         gotoxy() wgotoxy()
  3231.  
  3232.         Example:
  3233.  
  3234.         wfreeze(w,3,wrow(num));  /* First three lines frozen. (0-2) */
  3235.         whome(w);                /* Cursor goes to 3,0. */
  3236.  
  3237.  
  3238.                                                              winsert
  3239.         Summary:
  3240.  
  3241.         int winsert(num,row,tms)
  3242.         int num;                 /* Pointer to Window to Use */
  3243.         int row;                 /* Row to Insert Line Before */
  3244.         int tms;                 /* Number of Lines to Insert */
  3245.  
  3246.         Created: 04/30/86        Last Updated: 04/30/86
  3247.  
  3248.         Author: Bob Pritchett         Source (C/A): C
  3249.  
  3250.         Located in: COUTPUT.OBJ
  3251.  
  3252.         Requires: Nothing.
  3253.  
  3254.         Description:
  3255.  
  3256.         This  routine inserts tms lines before the specified line in  the 
  3257.         specified window, scrolling all lines below down tms.  The cursor 
  3258.         goes to the first column in the first new line.
  3259.  
  3260.         Compiler Specifics:
  3261.  
  3262.         Compiled with MSC.  See window notes.
  3263.  
  3264.         Return Value:
  3265.  
  3266.         Nothing.
  3267.  
  3268.         See Also:
  3269.  
  3270.         wdelete() wblank()
  3271.  
  3272.         Example:
  3273.  
  3274.         winsert(win,3,2);   /* Insert two lines before line 3,
  3275.                                new lines become 3 and 4, 3 becomes
  3276.                                line 5. */
  3277.  
  3278.  
  3279.                                                                wjump    
  3280.         Summary:
  3281.  
  3282.         int wjump(wind,x,y);
  3283.         int wind;                /* Pointer to Window to Jump */
  3284.         int x;                   /* Upper Right Row */
  3285.         int y;                   /* Upper Right Col */
  3286.  
  3287.         Created: 03/03/86        Last Updated: 03/09/86
  3288.  
  3289.         Author: Bob Pritchett         Source (C/A): C
  3290.  
  3291.         Located in: COUTPUT.OBJ
  3292.  
  3293.         Requires: Nothing.
  3294.  
  3295.         Description:
  3296.  
  3297.         This function activates and moves the specified window to the x,y 
  3298.         coordinates  given.   The window instantly 'jumps',  placing it's 
  3299.         upper right hand corner at x,y.
  3300.  
  3301.         Compiler Specifics:
  3302.  
  3303.         Compiled with MSC.  See window notes.
  3304.  
  3305.         Return Value:
  3306.  
  3307.         Nothing.
  3308.  
  3309.         See Also:
  3310.  
  3311.         wmove()
  3312.  
  3313.         Example:
  3314.  
  3315.         wjump(w2,10,10);         /* Jumps window w2 to 10,10 */
  3316.  
  3317.  
  3318.                                                             wmessage
  3319.         Summary:
  3320.  
  3321.         int wmessage(win,str,val);
  3322.         int win;                 /* Window to Use */
  3323.         char *str;               /* Message to Use */
  3324.         int val;                 /* Message Location */
  3325.  
  3326.         Created: 03/03/86        Last Updated: 03/03/86
  3327.  
  3328.         Author: Bob Pritchett         Source (C/A): C
  3329.  
  3330.         Located in: COUTPUT.OBJ
  3331.  
  3332.         Requires: wprint()
  3333.  
  3334.         Description:
  3335.  
  3336.         Using  the  window's border attribute,  this  function  prints  a 
  3337.         message  to the user on the bottom border.   For more information 
  3338.         see the description of wtitle().
  3339.  
  3340.         Compiler Specifics:
  3341.  
  3342.         None.
  3343.  
  3344.         Return Value:
  3345.  
  3346.         Nothing.
  3347.  
  3348.         See Also:
  3349.  
  3350.         wtitle()
  3351.  
  3352.         Example:
  3353.  
  3354.         wmessage(w,"< Press a Key >",0);
  3355.  
  3356.  
  3357.                                                                wmove    
  3358.         Summary:
  3359.  
  3360.         int wmove(wind,dir);
  3361.         int wind;                /* Pointer to Window to Move */
  3362.         int dir;                 /* Direction to Move Window */
  3363.  
  3364.         Created: 03/03/86        Last Updated: 03/09/86
  3365.  
  3366.         Author: Bob Pritchett         Source (C/A): C
  3367.  
  3368.         Located in: COUTPUT.OBJ
  3369.  
  3370.         Requires: Nothing.
  3371.  
  3372.         Description:
  3373.  
  3374.         This  function  will activate and move the specified  window  one 
  3375.         space in the direction given in dir.   The dir value is a  number 
  3376.         from one to four, up, right, down, and left, respectively.
  3377.  
  3378.         Compiler Specifics:
  3379.  
  3380.         Compiled with MSC.  See window notes.
  3381.  
  3382.         Return Value:
  3383.  
  3384.         Nothing.
  3385.  
  3386.         See Also:
  3387.  
  3388.         wjump()
  3389.  
  3390.         Example:
  3391.  
  3392.         wmove(w2,10,10);         /* Jumps window w2 to 10,10 */
  3393.  
  3394.  
  3395.                                                                wopen
  3396.         Summary:
  3397.  
  3398.         int wopen(x,y,x2,y2,type);
  3399.         int x;                   /* Upper Left Row */
  3400.         int y;                   /* Upper Left Col */
  3401.         int x2;                  /* Lower Right Row */
  3402.         int y2;                  /* Lower Right Col */
  3403.         int type;                /* Type of Border */
  3404.  
  3405.         Created: 03/03/86        Last Updated: 03/09/86
  3406.  
  3407.         Author: Bob Pritchett         Source (C/A): C
  3408.  
  3409.         Located in: COUTPUT.OBJ
  3410.  
  3411.         Requires: cbox()
  3412.  
  3413.         Description:
  3414.  
  3415.         This function opens a video window.  The current video attributes 
  3416.         are  used,  the portion of the screen covered is saved,  and then 
  3417.         blanked with the interior color.  The argument type may be of any 
  3418.         one of the valid types used by box() and cbox().
  3419.  
  3420.         Compiler Specifics:
  3421.  
  3422.         Compiled with MSC.  See window notes.
  3423.  
  3424.         Return Value:
  3425.  
  3426.         Returns  a  type int value needed to reference the  window  at  a 
  3427.         later time.
  3428.  
  3429.         See Also:
  3430.  
  3431.         wclose() wactivate()
  3432.  
  3433.         Example:
  3434.  
  3435.         int w;
  3436.  
  3437.         w = wopen(10,10,20,70,2);     /* Open a large window */ 
  3438.  
  3439.  
  3440.                                                               wprint
  3441.         Summary:
  3442.  
  3443.         int wprint(win,str);
  3444.         int win;                 /* Window to Use */
  3445.         char *str;               /* String to Print */
  3446.  
  3447.         Created: 03/03/86        Last Updated: 03/03/86
  3448.  
  3449.         Author: Bob Pritchett         Source (C/A): C
  3450.  
  3451.         Located in: COUTPUT.OBJ
  3452.  
  3453.         Requires: putchci()
  3454.  
  3455.         Description:
  3456.  
  3457.         Using  the window's inside attributes,  the string is printed  at 
  3458.         the current cursor position within the specified window, which is 
  3459.         activated  if  it  is  not  already  so.   The  following  escape 
  3460.         characters may be used:
  3461.  
  3462.                   \n  Newline
  3463.                   \t  Tab
  3464.                   \r  Return
  3465.                   \f  Form-Feed, clear window
  3466.  
  3467.         Compiler Specifics:
  3468.  
  3469.         None.
  3470.  
  3471.         Return Value:
  3472.  
  3473.         Nothing.
  3474.  
  3475.         See Also:
  3476.  
  3477.         wprintf()
  3478.  
  3479.         Example:
  3480.  
  3481.         wprint(w3,"This line is outputted where the cursor is.\n");
  3482.  
  3483.  
  3484.                                                              wprintf
  3485.         Summary:
  3486.  
  3487.         int wprintf(win,str,args...);
  3488.         int win;                 /* Window to Use */
  3489.         char *str;               /* Formatted String to Print */
  3490.         args...                  /* Formatting Arguments */
  3491.  
  3492.         Created: 03/09/86        Last Updated: 03/09/86
  3493.  
  3494.         Author: Bob Pritchett         Source (C/A): C
  3495.  
  3496.         Located in: WPRINTF.OBJ
  3497.  
  3498.         Requires: wprint()
  3499.  
  3500.         Description:
  3501.  
  3502.         This  function  supports the full formatting capabilities of  the 
  3503.         regular  printf()  function,  only  it prints  to  the  specified 
  3504.         window.  A maximum of 15 formatting arguments may be included, it 
  3505.         is unlikely more should be needed.
  3506.  
  3507.         Compiler Specifics:
  3508.  
  3509.         None.
  3510.  
  3511.         Return Value:
  3512.  
  3513.         Nothing.
  3514.  
  3515.         See Also:
  3516.  
  3517.         wprint()
  3518.  
  3519.         Example:
  3520.  
  3521.         wprintf(w2,"This is formatting... %03d %s.\n",38,"times");
  3522.  
  3523.  
  3524.                                                               wputat
  3525.         Summary:
  3526.  
  3527.         int wputat(win,x,y,string);
  3528.         int win;                 /* Window to Use */
  3529.         int x;                   /* Row to Print on */
  3530.         int y;                   /* Column to Print at */
  3531.         char *string;            /* String to Print */
  3532.  
  3533.         Created: 03/09/86        Last Updated: 03/09/86
  3534.  
  3535.         Author: Bob Pritchett         Source (C/A): C
  3536.  
  3537.         Located in: WPUTAT.OBJ
  3538.  
  3539.         Requires: wgotoxy() wprint()
  3540.  
  3541.         Description:
  3542.  
  3543.         This routine will place the string in the window specified at the 
  3544.         coordinates  specified.   If not active the specified window will 
  3545.         be activated.
  3546.  
  3547.         Compiler Specifics:
  3548.  
  3549.         Compiled with MSC.  See window notes.
  3550.  
  3551.         Return Value:
  3552.  
  3553.         Nothing.
  3554.  
  3555.         See Also:
  3556.  
  3557.         putat()
  3558.  
  3559.         Example:
  3560.  
  3561.         wputat(win,4,5,"+ The plus sign is at 4,5 in window win.");
  3562.  
  3563.  
  3564.                                                              wputatf
  3565.         Summary:
  3566.  
  3567.         int wputatf(num,row,col,string,args...)
  3568.         int num;                 /* Pointer to Window to Use */
  3569.         int row;                 /* Row Coordinate */
  3570.         int col;                 /* Col Coordinate */
  3571.         char *string;            /* Format String */
  3572.         args...                  /* Formatting Arguments */
  3573.  
  3574.         Created: 05/01/86        Last Updated: 05/01/86
  3575.  
  3576.         Author: Bob Pritchett         Source (C/A): C
  3577.  
  3578.         Located in: WPUTATF.OBJ
  3579.  
  3580.         Requires: Nothing.
  3581.  
  3582.         Description:
  3583.  
  3584.         This  routine performs the same function as putatf() only  within 
  3585.         the specified window.
  3586.  
  3587.         Compiler Specifics:
  3588.  
  3589.         Compiled with MSC.  See window notes.
  3590.  
  3591.         Return Value:
  3592.  
  3593.         Nothing.
  3594.  
  3595.         See Also:
  3596.  
  3597.         putatf() wputat() putat()
  3598.  
  3599.         Example:
  3600.  
  3601.         wputatf(win,4,6,"This line at %d,%d.",4,6);
  3602.  
  3603.  
  3604.                                                             wputchar
  3605.         Summary:
  3606.  
  3607.         int wputchar(num,c);
  3608.         int num;                 /* Number of Window to Use */
  3609.         int c;                   /* Character to Output in Window */
  3610.  
  3611.         Created: 04/25/86        Last Updated: 04/25/86
  3612.  
  3613.         Author: Bob Pritchett         Source (C/A): C
  3614.  
  3615.         Located in: COUTPUT.OBJ
  3616.  
  3617.         Requires: Nothing.
  3618.  
  3619.         Description:
  3620.  
  3621.         This  function  simply  outputs  the  character  at  the  current 
  3622.         position of the specified window.
  3623.  
  3624.         Compiler Specifics:
  3625.  
  3626.         Compiled with MSC.  See window notes.
  3627.  
  3628.         Return Value:
  3629.  
  3630.         Nothing.
  3631.  
  3632.         See Also:
  3633.  
  3634.         wprint() wprintf()
  3635.  
  3636.         Example:
  3637.  
  3638.         wputchar(win,'\n');
  3639.  
  3640.  
  3641.                                                                 wrow    
  3642.         Summary:
  3643.  
  3644.         int wrow(wind);
  3645.         int wind;                /* Pointer to Window to Use */
  3646.  
  3647.         Created: 03/03/86        Last Updated: 03/09/86
  3648.  
  3649.         Author: Bob Pritchett         Source (C/A): C
  3650.  
  3651.         Located in: COUTPUT.OBJ
  3652.  
  3653.         Requires: Nothing.
  3654.  
  3655.         Description:
  3656.  
  3657.         This  function returns the number of the highest row in a window.  
  3658.         If a window has four lines,  numbered zero to three,  wrow() will 
  3659.         return a three.  Mostly an internal routine.
  3660.  
  3661.         Compiler Specifics:
  3662.  
  3663.         Compiled with MSC.  See window notes.
  3664.  
  3665.         Return Value:
  3666.  
  3667.         Nothing.
  3668.  
  3669.         See Also:
  3670.  
  3671.         wcol()
  3672.  
  3673.         Example:
  3674.  
  3675.         x = wrow(w3);            /* Returns the number of highest row */
  3676.  
  3677.  
  3678.                                                              wscroll
  3679.         Summary:
  3680.  
  3681.         int wscroll(num,dir,tms)
  3682.         int num;                 /* Number of Window to Use */
  3683.         int dir;                 /* Direction to Scroll in */
  3684.         int tms;                 /* Number of Lines to Scroll */
  3685.  
  3686.         Created: 03/03/86        Last Updated: 03/03/86
  3687.  
  3688.         Author: Bob Pritchett         Source (C/A): C
  3689.  
  3690.         Located in: COUTPUT.OBJ
  3691.  
  3692.         Requires: Nothing.
  3693.  
  3694.         Description:
  3695.  
  3696.         This  function will scroll the specified window tms lines in  the 
  3697.         specified  window.   The  direction is 0 for up,  or 1 for  down.  
  3698.         Specifying 0 lines will clear the window.
  3699.  
  3700.         Compiler Specifics:
  3701.  
  3702.         Compiled with MSC.  See window notes.
  3703.  
  3704.         Return Value:
  3705.  
  3706.         Nothing.
  3707.  
  3708.         See Also:
  3709.  
  3710.         scroll()
  3711.  
  3712.         Example:
  3713.  
  3714.         wscroll(win,0,1);
  3715.  
  3716.  
  3717.                                                               wtitle
  3718.         Summary:
  3719.  
  3720.         int wtitle(win,str,val);
  3721.         int win;                 /* Window to Use */
  3722.         char *str;               /* Title to Use */
  3723.         int val;                 /* Title Location */
  3724.  
  3725.         Created: 03/03/86        Last Updated: 03/03/86
  3726.  
  3727.         Author: Bob Pritchett         Source (C/A): C
  3728.  
  3729.         Located in: COUTPUT.OBJ
  3730.  
  3731.         Requires: wprint()
  3732.  
  3733.         Description:
  3734.  
  3735.         This  routine  will  place a string along the top border  of  the 
  3736.         specified  window in either the center,  on the left,  or on  the 
  3737.         right.  To specify the location, val is 0, center, 1, left, or 2, 
  3738.         right.  The window's border attribute is used.
  3739.  
  3740.         Compiler Specifics:
  3741.  
  3742.         None.
  3743.  
  3744.         Return Value:
  3745.  
  3746.         Nothing.
  3747.  
  3748.         See Also:
  3749.  
  3750.         wmessage()
  3751.  
  3752.         Example:
  3753.  
  3754.         wtitle(w,"[ Window 1 ]",1);
  3755.  
  3756.  
  3757.                                                               wvline
  3758.         Summary:
  3759.  
  3760.         int wvline(wind,col);
  3761.         int wind;                /* Window to Use */
  3762.         int col;                 /* Column for the Line */
  3763.  
  3764.         Created: 03/03/86        Last Updated: 03/03/86
  3765.  
  3766.         Author: Bob Pritchett         Source (C/A): C
  3767.  
  3768.         Located in: COUTPUT.OBJ
  3769.  
  3770.         Requires: cvline() putchci() gotoxy()
  3771.  
  3772.         Description:
  3773.  
  3774.         This  function calls cvline() with the correct parameters to draw 
  3775.         a vertical line in the specified window.   The correct colors and 
  3776.         border styles are used.
  3777.  
  3778.         Compiler Specifics:
  3779.  
  3780.         None.
  3781.  
  3782.         Return Value:
  3783.  
  3784.         Nothing.
  3785.  
  3786.         See Also:
  3787.  
  3788.         cvline() whline()
  3789.  
  3790.         Example:
  3791.  
  3792.         #include <color.h>       /* Just for the colors... */
  3793.  
  3794.         int w;
  3795.  
  3796.         w = wopen(5,5,20,60,1);  /* A box with a single line border */
  3797.  
  3798.         wvline(w,10);        /* Draws a line down the box */
  3799.  
  3800.  
  3801.                                                               CheckC   
  3802.         Summary:
  3803.  
  3804.         Created: 12/25/85        Last Updated: 01/09/86
  3805.  
  3806.         Author: Bob Pritchett         Source: C
  3807.  
  3808.         Syntax: CheckC <source> [<source>...]
  3809.  
  3810.         Documentation:
  3811.  
  3812.                                      CheckC
  3813.  
  3814.                              A Small C Code Checker.
  3815.  
  3816.                           Copyright 1985 Bob Pritchett
  3817.                              New Dimension Software
  3818.  
  3819.                            Version 1.3 - Documentation
  3820.  
  3821.              CheckC  is a small C source checker I wrote to help me debug 
  3822.         compiler errors.   As you surely know, a missing or extra { } ( ) 
  3823.         [ ] " ' can throw off a compiler creating hundreds of errors, and 
  3824.         not even giving a hint as to the problem.  CheckC will go through 
  3825.         your  source  file  and  make sure that  all  of  your  matchable 
  3826.         characters are matched.  It is smart enough to know when to count 
  3827.         characters,  knowing  the escape codes and  scanf/printf  special 
  3828.         characters.  
  3829.              If  at  the end of the file all opening characters  are  not 
  3830.         matched with a closing,  or there is an unequal number of " ' you 
  3831.         will  be notified as to what the error is,  and how many times it 
  3832.         hapens.
  3833.              To use CheckC simply use the following command line:
  3834.  
  3835.              CHECKC <source> [<source>...]
  3836.  
  3837.              Where <source> is the file to check,  followed by any number 
  3838.         of  additional  files.   CheckC will keep you  informed  of  it's 
  3839.         progress.
  3840.              Now  this information is useful,  and can often save lots of 
  3841.         exasperating file searches, but on large files you spend a lot of 
  3842.         time trying to locate the error yourself.
  3843.              The solution: Contact me.
  3844.              I have now in the debugging stages two more versions of  the 
  3845.         program that include the following options:
  3846.  
  3847.              /M - Create a 'Map' of the file.  A map is a seperate report 
  3848.         file  that  contains all of the matchable characters,  set up  so 
  3849.         that  looking at it will provide a visually obvious  location  of 
  3850.         the problem.  A map could look like:
  3851.          
  3852.              /* */
  3853.              ( )
  3854.              {
  3855.              ( ( [] ) )
  3856.  
  3857.  
  3858.              }
  3859.  
  3860.              In  the  example  above there is a  comment  of  unspecified 
  3861.         length,  followed by an open and close parenthisis,  then an open 
  3862.         bracket,  and then a source line that could look like  if ( x = ( 
  3863.         i  +  array[n] ) )  and then a closing bracket on the last  line.  
  3864.         This would indicate a perfectly fine source.  (Note that  comment 
  3865.         markers go in a pair on one line,  brackets always have their own 
  3866.         lines,  and everything else put on a single line until the number 
  3867.         of open ( [ " ' is at zero. )
  3868.  
  3869.              /A  - Analysis of source code.   With this option an English 
  3870.         analysis is placed in a separate reference file.   This  analysis 
  3871.         is  comprehensive  in it's ability to distinguish beginnings  and 
  3872.         endings of code blocks ( {} ) and thus narrow down the area where 
  3873.         the  error could be.   This also allows for  multiple  analysises 
  3874.         that  don't foul each other up,  as at the end of each code block 
  3875.         the counters are temporarily initialized.  The only defect I have 
  3876.         found so far is that like a compiler,  you may get several errors 
  3877.         for a single bug.
  3878.  
  3879.              Why are these still in production while I am releasing  this 
  3880.         version  you may ask?   Well,  while other then making them  look 
  3881.         nice,  I  have  to do extensive debugging,  since error  trapping 
  3882.         tools really shouldn't have errors.  I have not yet needed either 
  3883.         of these bad enough to take the time to finish them myself.   (As 
  3884.         a matter of fact,  while these may be almost done right now, they 
  3885.         are  in  two seperate versions,  and combining the  two  modified 
  3886.         sources  is  going to be a bit of a job...)  A ray  of  hope  for 
  3887.         those who would like these features.   Simply contact me, tell me 
  3888.         that  you really like the program,  and would like to have  those 
  3889.         features,  and  maybe some new one I haven't thought of.   If you 
  3890.         would like the source code, ask for it, and I may send it to you.  
  3891.         (I  don't  know,  I  don't even know if anyone  will  use  it...)  
  3892.         Please include any comments,  questions, or suggestions you have.  
  3893.         (For example,  it wouldn't be hard for me to add wildcards to the 
  3894.         file names, but I don't need it yet, so it isn't there.)
  3895.              Once again,  if you have any comment or whatever, please let 
  3896.         me know.
  3897.  
  3898.  
  3899.                                                                FLine   
  3900.         Summary:
  3901.  
  3902.         Created: 03/02/86        Last Updated: 03/03/86
  3903.  
  3904.         Author: Bob Pritchett         Source: C
  3905.  
  3906.         Syntax: FLine <source> <dest>
  3907.  
  3908.         Documentation:
  3909.  
  3910.                                       FLine
  3911.  
  3912.                         A Structured Programming Utility
  3913.  
  3914.                           Copyright 1986 Bob Pritchett
  3915.                              New Dimension Software
  3916.  
  3917.                            Version 1.1 - Documentation
  3918.  
  3919.              FLine  is  a programming tool that goes through source  code 
  3920.         and  places  all lines beginning with a non-whitespace  character 
  3921.         into the specified output file.   This creates a useful reference 
  3922.         file  containing a list of all function  declarations,  including 
  3923.         arguments,   global   variables,   comments,   and  pre-processor 
  3924.         directives.   (This assumes, of course that you indent the actual 
  3925.         code within your source file.)
  3926.              FLine is called as:
  3927.  
  3928.         FLine <source> <dest>
  3929.  
  3930.              Where  <source> is the source code to process and <dest>  is 
  3931.         the name of the file to place the output in.   Note that whatever 
  3932.         is in <dest> is erased and replaced with FLine's output.
  3933.  
  3934.  
  3935.                                                              COLOR.H   
  3936.         Summary:
  3937.  
  3938.         Created: 04/14/86        Last Updated: 04/14/86
  3939.  
  3940.         Author: Bob Pritchett
  3941.  
  3942.         Description:
  3943.  
  3944.         This  include  file  contains the define statements for  all  the 
  3945.         color attributes possible in text.   The colors are listed with a 
  3946.         three  letter name followed by a _ and F or B signifying fore  or 
  3947.         background attribute.   To get a full attribute,  add a fore  and 
  3948.         background color.  (BLU_F+RED_B)
  3949.  
  3950.         Also  included  are definitions for BOLD (which is  added  to  an 
  3951.         attribute to intensify it),  NORMAL (white on black), and several 
  3952.         others.   (NOTE:   Some  of  the  attriutes  are  for  monochrome 
  3953.         displays  only,  for example,  UNDERLINE shows as blue on a color 
  3954.         screen, and REVERSE as black on white.)
  3955.  
  3956.         For a list of all the colors and their abbreviations look at  the 
  3957.         header file.
  3958.  
  3959.  
  3960.                                                             CSRDOS.H   
  3961.         Summary:
  3962.  
  3963.         Created: 04/04/86        Last Updated: 04/04/86
  3964.  
  3965.         Author: Bob Pritchett and Alan Losoff
  3966.  
  3967.         Description:
  3968.  
  3969.         This  header  file  contains structures  and  #define  statements 
  3970.         needed by functions accessing DOS 2.0 functions.
  3971.  
  3972.  
  3973.                                                            CSRMISC.H
  3974.         Summary:
  3975.  
  3976.         Created: 04/20/86        Last Updated: 04/20/86
  3977.  
  3978.         Author: Bob Pritchett
  3979.  
  3980.         Description:
  3981.  
  3982.         This  header  file contains dummy() and the defintions for  min() 
  3983.         and  max() macros which were ommitted from  Microsoft's  standard 
  3984.         library.
  3985.  
  3986.  
  3987.                                                            CSRTIME.H
  3988.         Summary:
  3989.  
  3990.         Created: 05/05/86        Last Updated: 04/20/86
  3991.  
  3992.         Author: Bob Pritchett
  3993.  
  3994.         This  file contains two static char * arrays containing the names 
  3995.         of the days of the week and the days of the month.   The days  of 
  3996.         the week start with Sunday, the months start with a null and then 
  3997.         January as the second entry,  element one, to allow compatibility 
  3998.         with the way DOS returns the date.
  3999.  
  4000.  
  4001.                                                             ERRORS.H
  4002.         Summary:
  4003.  
  4004.         Created: 05/05/86        Last Updated: 05/05/86
  4005.  
  4006.         Author: Bob Pritchett (Data from Norton's Book.)
  4007.  
  4008.         This  file  contains  a static char * array  containing  the  DOS 
  4009.         errors  returned in AX after a DOS function call.   These  errors 
  4010.         are for DOS 2.X alone, and do not apply to DOS 3.X extended error 
  4011.         codes.  Error descriptions start with element one.
  4012.  
  4013.  
  4014.                                                               SKEY.H   
  4015.         Summary:
  4016.  
  4017.         Created: 02/22/86        Last Updated: 02/22/86
  4018.  
  4019.         Author: Bob Pritchett (Data from Norton's Book.)
  4020.  
  4021.         Description:
  4022.  
  4023.         This  header  file  contains #define statements for  all  of  the 
  4024.         special keys and combinations on the keyboard.   These values are 
  4025.         those returned as extened codes,  after a null is read.  They are 
  4026.         in the basic format of KEY1KEY2,  or simply Fx for function keys.  
  4027.         (Note:   Function  keys are numbered through 40,  1-10 are normal 
  4028.         keys,  11-20 are shift keys,  21-30 are ctrl keys,  and 31-40 are 
  4029.         alt keys.  As in Shift-F2 returns F12.)                           C Spot Run - Documentation
  4030.  
  4031.  
  4032.                         Appendix A - Updating the Library
  4033.  
  4034.              The  C Spot Run routine library is constantly being added to 
  4035.         as  we receive contributions and write more  routines  ourselves.  
  4036.         In  the interest of saving time and space,  library updates  will 
  4037.         come in one of two forms.
  4038.              First,   small  collections  of  new  routines,   or  single 
  4039.         routines,  will be placed in archives along with a single page of 
  4040.         documentation  and  distributed via BBSs.  Registered users  will 
  4041.         receive information about new updates or a copy of those updates.  
  4042.         When  you  receive an update archive you simply place  the  files 
  4043.         into  your  library  or  linking  directory  and  print  out  the 
  4044.         documentation page,  which is then inserted in alphabetical order 
  4045.         into  the library description section of this manual.   (This  is 
  4046.         why  those pages are not numbered and we recommend  storing  your 
  4047.         manual in a three ring binder.)  
  4048.              Second,   major  updates  to  the  entire  library  will  be 
  4049.         distributed  in  archives  containing all  the  routines,  and  a 
  4050.         totally new version of the complete manual.   These updates  will 
  4051.         be on new version numbers.                           C Spot Run - Documentation
  4052.  
  4053.  
  4054.                          Appendix B - Contacting Authors
  4055.  
  4056.              Each  description  page mentions the name of the  author  of 
  4057.         that routine, utility, or aid.  If for some reason you would like 
  4058.         to contact that author you may check the following directory  for 
  4059.         addresses  and  possibly  phone  numbers.    (NOTE:  All  of  the 
  4060.         following   authors   voluntarily  placed  their  addresses   and 
  4061.         sometimes  their  phone numbers in  this  directory.   They  have 
  4062.         indicated a willingness to answer questions by doing this, but we 
  4063.         ask  you  to  be considerate and remember that some may be  in  a 
  4064.         different time zone then the one you are calling from.)
  4065.  
  4066.              Gotthelf, Joe            (609) 234-3347 - Data (300/1200B)
  4067.                4 Overbrook Circle
  4068.                Moorestown, NJ 08057
  4069.  
  4070.              Mongelluzzo, Philip A.   (203) 574-2326 - Voice
  4071.                273 Windy Drive        (203) 271-1579 - Data (300/1200B)
  4072.                Waterbury, CT  06705
  4073.  
  4074.              Pritchett, Bob           (609) 424-2595 - Voice 4pm - 10pm
  4075.                23 Pawtucket Drive     (609) 354-9259 - Data (300/1200B)
  4076.                Cherry Hill, NJ 08003        FidoNet: 107/414                           C Spot Run - Documentation
  4077.  
  4078.  
  4079.                   Appendix C - Submitting Routines or Utilities
  4080.  
  4081.              All submissions to the routine library or utility collection 
  4082.         should be made using the form on the following page,  and  should 
  4083.         be  sent  to  the  address on that  form.   Please  do  not  make 
  4084.         additions to the library or utility collection on your own,  this 
  4085.         creates a problem and complicates the distribution.   
  4086.              In   addition  to  the  following  form  please  enclose   a 
  4087.         description  of the routine or utility,  preferably on an IBM  PC 
  4088.         disk.   Please make this description in the appropriate format as 
  4089.         specified in sections 4.1 and 4.2 of this manual.
  4090.  
  4091.  
  4092.                          Routine/Utility Submission Form
  4093.  
  4094.  
  4095.         Name of Routine/Utility: ___________________________________
  4096.  
  4097.         Form(s) of Submission (C/ASM/OBJ/LIB/EXE/COM): _____________
  4098.  
  4099.  
  4100.         Are you releasing this  routine/utility to the Pubic  Domain 
  4101.  
  4102.         or under another program? (PD/Program):  ___________________
  4103.  
  4104.  
  4105.         If this  release is under a voluntary contribution  program, 
  4106.  
  4107.         what is the suggested contribution? ($): ___________________
  4108.  
  4109.  
  4110.         May we put your address in the author directory? (Y/N): ____
  4111.  
  4112.                                       Your phone number? (Y/N): ____
  4113.  
  4114.                                       Your data address? (Y/N): ____
  4115.  
  4116.  
  4117.              Name: _________________________________
  4118.  
  4119.           Address: _________________________________
  4120.  
  4121.              City: _____________________ State: ____  ZIP: _________
  4122.  
  4123.             Phone: (    )     -          Hours: ____________________
  4124.  
  4125.         Source ID: _______________  CompuServe ID: _________________
  4126.  
  4127.            Data #: (    )     -          Hours: ____________________
  4128.  
  4129.          Fido Net: ____ /_____            Baud: ____________________
  4130.  
  4131.         In  submitting  this form you place  your routine or utility 
  4132.         into the C Spot Run  C Add-on and Utility Library,  and give 
  4133.         permission  for it's  use as  specified  in  Appendix  C and
  4134.         sections one  and two of this manual.
  4135.  
  4136.         Please send this form via US Mail to the following  address,
  4137.         or via modem to the accompanying FidoNet address.
  4138.  
  4139.         Don't forget the description sheets, and of course the files
  4140.         you are submitting!
  4141.  
  4142.              C Spot Run
  4143.              New Dimension Software   FidoNet 107/414
  4144.                23 Pawtucket Drive      Data: (609) 354-9259
  4145.                Cherry Hill, NJ 08003
  4146.  
  4147.  
  4148.                                User Response Form
  4149.  
  4150.  
  4151.              We  would  like to hear from you,  and would appreciate  any 
  4152.         comments,  suggestions,  and/or donations.   Even if you are  not 
  4153.         making  a  donation  or contributing to  the  library,  we  would 
  4154.         appreciate some input,  and it helps us to know if the library is 
  4155.         serving  it's intended purpose,  and gives us some information on 
  4156.         our  users.   Of course this is voluntary,  but we hope you  will 
  4157.         take the time to fill out and mail this form.
  4158.  
  4159.         How did you obtain your copy of C Spot Run? ________________
  4160.  
  4161.         ____________________________________________________________
  4162.  
  4163.  
  4164.         What,  in your  opinion, are  the most  useful  routines and 
  4165.  
  4166.         utilities? _________________________________________________
  4167.  
  4168.  
  4169.         What do you think of the documentation? ____________________
  4170.  
  4171.         ____________________________________________________________
  4172.  
  4173.  
  4174.         Are  you enclosing  a contribution, and  if so, how much and
  4175.  
  4176.         why? _______________________________________________________
  4177.  
  4178.  
  4179.         Do you have any comments and/or suggestions? _______________
  4180.  
  4181.         ____________________________________________________________
  4182.  
  4183.         ____________________________________________________________
  4184.  
  4185.  
  4186.         Would you  like to be on a possible mailing list? (Y/N) ____
  4187.  
  4188.  
  4189.              Name: _________________________________
  4190.  
  4191.           Address: _________________________________
  4192.  
  4193.              City: _____________________ State: ____  ZIP: _________
  4194.  
  4195.             Phone: (    )     -          Hours: ____________________
  4196.  
  4197.         Source ID: _______________  CompuServe ID: _________________
  4198.  
  4199.            Data #: (    )     -          Hours: ____________________
  4200.  
  4201.          Fido Net: ____ /_____            Baud: ____________________
  4202.  
  4203.  
  4204.  
  4205.            Thank you, we hope you find the C Spot Run library of use.
  4206.  
  4207.         Please send this form via US Mail to the following  address,
  4208.         or via modem to the accompanying FidoNet address.
  4209.  
  4210.  
  4211.              C Spot Run
  4212.              New Dimension Software   FidoNet 107/414
  4213.                23 Pawtucket Drive      Data: (609) 354-9259
  4214.                Cherry Hill, NJ 08003
  4215.  
  4216.  
  4217.                                    Order Form
  4218.  
  4219.              NOTE:   Users  who receive source code may not  redistribute 
  4220.         it.  The code is for your use only, and the right to redistribute 
  4221.         is  not included in the purchase.   If two or more people will be 
  4222.         using  the  source,  rather  then ordering just one  copy  please 
  4223.         contact the author about a discount on several copies.
  4224.  
  4225.  
  4226.              (  )  I would like to register as a C Spot Run User, receive 
  4227.  
  4228.         complete source code on disk, update notifications, and be placed 
  4229.  
  4230.         on  whatever mailing list may be formed.   I am enclosing  a  $50 
  4231.  
  4232.         donation.
  4233.  
  4234.  
  4235.              (   )   I would like to register as a C Spot  Run  User  and 
  4236.  
  4237.         receive  all the benfits of such status with the exception of the 
  4238.  
  4239.         source code.  I am enclosing a $10 donation.
  4240.  
  4241.  
  4242.              Name: _________________________________
  4243.  
  4244.           Address: _________________________________
  4245.  
  4246.              City: _____________________ State: ____  ZIP: _________
  4247.  
  4248.             Phone: (    )     -          Hours: ____________________
  4249.  
  4250.         Source ID: _______________  CompuServe ID: _________________
  4251.  
  4252.            Data #: (    )     -          Hours: ____________________
  4253.  
  4254.          Fido Net: ____ /_____            Baud: ____________________
  4255.  
  4256.  
  4257.              C Spot Run
  4258.              New Dimension Software   FidoNet 107/414
  4259.                23 Pawtucket Drive      Data: (609) 354-9259
  4260.                Cherry Hill, NJ 08003